You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using this lib and I have a problem to convert png image on webp. In particular when I try to encode png Data, App crashes on line 1284 if(!WebPPictureImportRGBA(&picture, buffer.data, (int)buffer.rowBytes)) goto fail;
I find a possible solution of problem: analyzing the code I see that variable "lossless" is used to set picture.use_argb, so if you pass NO app crash on png image, if you force YES on
YYImageCoder.m - line 2683
Hi,
I'm using this lib and I have a problem to convert png image on webp. In particular when I try to encode png Data, App crashes on line 1284
if(!WebPPictureImportRGBA(&picture, buffer.data, (int)buffer.rowBytes)) goto fail;
I find a possible solution of problem: analyzing the code I see that variable "lossless" is used to set
picture.use_argb, so if you pass NO app crash on png image, if you force YES on
YYImageCoder.m - line 2683
CFDataRef frameData = YYCGImageCreateEncodedWebPData(image, YES, _quality, 4, YYImagePresetDefault);
it works.
I suggest to modify the switcher on YYImageCoder (line 2357) in
..
case YYImageTypeWebP: {
_quality = 0.8;
_lossless = YES;
} ...
The text was updated successfully, but these errors were encountered: