Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined: webp.Encode #63

Open
spaiki007 opened this issue Oct 24, 2023 · 4 comments
Open

undefined: webp.Encode #63

spaiki007 opened this issue Oct 24, 2023 · 4 comments

Comments

@spaiki007
Copy link

func Encode(w io.Writer, m image.Image, opt *Options) (err error)

In the docks, this function is present, in fact it is not!

@khanakia
Copy link

khanakia commented Nov 9, 2023

I am having same issue

@wes-kay
Copy link

wes-kay commented Nov 10, 2023

@spaiki007 @khanakia You need cgo enabled on windows,

Install GCC
Set up your path.

$ env -w CGO_ENABLED=1
$ go env CGO_ENABLED
>> 1

Then build.

@mrhoodz
Copy link

mrhoodz commented Mar 22, 2024

I am having same issue

same here @spaiki007

@souzace
Copy link

souzace commented May 6, 2024

I solved following the sequence:

  1. installed tdm64-gcc-10.3.0-2.exe
  2. adding C:\TDM-GCC-64\bin to System Variable PATH (on top = or left). (suggestion of @StackzOfZtuff https://stackoverflow.com/users/4247268/stackzofztuff)https://stackoverflow.com/a/39867163)
  3. changing CGO_ENABLED value to 1 like a sample of @wes-kay but in my case (using git bash), my command was: "setx CGO_ENABLED 1"
  4. Restart Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants