-
Notifications
You must be signed in to change notification settings - Fork 86
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
(nullable NSData *)sd_encodedWebpDataWithImage returns NIL after 0.14.2 update #94
Comments
Can you provide a reproduce demo ? Or code to trigger this.
From which version to 0.14.2 ? Is there any iOS version bump or min-deployment-target bump during the version upgrade? I can't find anything related to WebP Encoding during the recent changes. |
I don't have that problem with version 0.14.1. |
to reproduce:
create the image and get the WebP data:
data will be nil |
Is this cause the issue ? But I don't think this vImage changes is wrong. Because the Or this is Apple's vImage bug...They should match the documentation behavior: See: https://developer.apple.com/documentation/accelerate/1399118-vimagebuffer_initwithcgimage |
If this still cause issue, I can just revert this changes and re-release v0.14.3 |
Your example code, seems want to encode 8-bit WebP CGImage (using RGBA8888) into the wide color (extended color) (RGBA16161616), this cause issue |
But I can not revert to previous one, since that's color space is used to solve #90 A better solid fix, is:
|
Fixed, but I also found SDWebImage's We don't really happy with the Monochrome CGImage, you can always use Our encoding API in history, only prefers the rgba color, not white-alpha color, because this is the most common use case and we're not professional Image Editing library :) |
@DanielZanchi Try using the #95 and test again My test case can succefully encode this monochrome clear color |
That works! Thanks |
@DanielZanchi Use 0.14.3 |
After updating the framework to 0.14.2 if I try to get the data of a clear (transparent) UIImage it will return NIL.
- (nullable NSData *)sd_encodedWebpDataWithImage
enters line 904 and returns NIL:
The text was updated successfully, but these errors were encountered: