Page 5 of 5
Re: ImagePlugin Module (Cross platform multi format de-/enco
Posted: Tue Sep 01, 2020 10:27 am
by PeDe
Is it possible to use the ImagePlugin with the function "EncodeImage(#Image, #PB_ImagePlugin_PNG, #False, 32)"?
For this I have to use "UsePNGImageEncoder()" additionally. If I use #SystemImagePlugin_PNG as parameter, I don't get an image encoded.
Peter
Re: ImagePlugin Module (Cross platform multi format de-/enco
Posted: Tue Sep 01, 2020 11:12 am
by wilbert
PeDe wrote:If I use #SystemImagePlugin_PNG as parameter, I don't get an image encoded.
It works fine when I try on my computer
Code: Select all
ImagePlugin::UseSystemImageEncoder()
SaveImage(Image, "test2.png", ImagePlugin::#SystemImagePlugin, ImagePlugin::#SystemImagePlugin_PNG)
*Buffer = EncodeImage(Image, ImagePlugin::#SystemImagePlugin, ImagePlugin::#SystemImagePlugin_PNG)
Re: ImagePlugin Module (Cross platform multi format de-/enco
Posted: Tue Sep 01, 2020 11:24 am
by PeDe
Thank you wilbert,
I used the parameters incorrectly and did not set 'Flags' correctly. Now everything works without problems.
Peter
Re: ImagePlugin Module (Cross platform multi format de-/encoder)
Posted: Sun Feb 13, 2022 1:02 pm
by zikitrake
@Wilbert, I don't know if you saw it. Or for other users that might be interested in a PB C Backend compatible version
https://www.purebasic.fr/english/viewto ... 16#p580716

And thank you for your excellent work!!