Skip to content

extrace apk icon, encouter image: unknown format #89

Description

@bourne-3

My requirement is to extract the icon file from the apk file

Here is the code:

func ExtractIcon() {
	apkPath := "/Users/selwyn/Desktop/taptap_2.68.4-mkt.100000_sem.apk"

	pkg, err := apk.OpenFile(apkPath)
	if err != nil {
		panic(err)
	}
	defer pkg.Close()

	icon, err := pkg.Icon(nil) // returns the icon of APK as image.Image
	if err != nil {
		panic(err)
	}
	fmt.Println(icon)
}

image: unknown format error show;
Here is the apk file download link:https://d2.tapurl.com/latest/sem-360ss_cn03syyx2_id235106

How can i solve thie problem,thx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions