pixiv / go-libjpeg

An implementation of Go binding for libjpeg (or libjpeg-turbo).
BSD 3-Clause "New" or "Revised" License
157 stars 52 forks source link

How to fix JCS_EXT_RGBA is not supported on osx? #68

Open snaffi opened 2 years ago

snaffi commented 2 years ago

I run app with next env on osx

CGO_CFLAGS=-I/usr/local/opt/jpeg/include
CGO_CFLAGS_ALLOW=-Xpreprocessor
CGO_ENABLED=1
CGO_LDFLAGS=-L/usr/local/opt/jpeg/lib

Get an error on jpeg.Encode

JCS_EXT_RGBA is not supported (probably built without libjpeg-turbo)

thank you

unak commented 2 years ago

hmm, your libjpeg is really libjpeg-turbo? How did you install it?

snaffi commented 2 years ago
brew instal libjpeg-turbo

Warning: No remote 'origin' in /usr/local/Homebrew, skipping update!
Warning: jpeg-turbo 2.1.3 is already installed and up-to-date.
To reinstall 2.1.3, run:
  brew reinstall jpeg-turbo