Open skochan opened 10 years ago
To reproduce a color shift, take the Demo project, and change the following in ViewController.m
:
Change static CGFloat alpha = 0.6f;
to static CGFloat alpha = 1.0f;
Add the following lines after UIImage *demoImage = [UIImage imageNamed:imageFileName];
:
UIGraphicsBeginImageContext(demoImage.size);
[demoImage drawInRect:CGRectMake(0, 0, demoImage.size.width, demoImage.size.height)];
demoImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
@skochan I am seeing the same issue and thanks for the tip to convert it to a Jpeg and only then convert to WebP. like @newacct I am also downscaling the image so now I downscale, convert to jpeg and then to weep. Of course this causes extra processing but solves the issue as a workaround.
I am seeing the same issue here. Has anybody found the reason for this?
This should fix the issue... I attached full file for simplicity... rename as .m :)
这是来自QQ邮箱的自动回复邮件。 您好,我已经收到您的邮件了,我会尽快回复您。
[This was posted as part of another topic, which was closed....not by me). So I moved it here
Here are two images, JPEG and webP. Notice the big color shift. The UIImage that's given to the JPEG and webP compressors is generated from a cocos2D openGL layer that gets rendered into a UIImage. I'm not sure if that's affecting the webP encoder, but as you can see, the color shift is noticeable. Again, If I decompress the JEPG and then recompress with webP, I have no problem--there is no color shift