Question

I am going through the C4Image Class Reference and trying to play with the filters, but, for every filter I try, the image just fades to a white screen once it is applied. Here is a link to my project on GitHub. What am I doing wrong here?

Was it helpful?

Solution

The link to your project is great. I played around with your project and tested a few things on projects I built on my computer.

The reason your images are fading to white is that the image size of C4Ryan1.JPG is larger than 4096 for its width.

In general, the maximum w/h for images on iOS 4096 × 4096. The following link has a good explanation:

https://stackoverflow.com/a/13515060/1218605

After changing your file's size from 4272 × 2848 to 4096 × 2731 the filters started working as expected.

p.s. The 0.1f vibrance is really subtle, I changed it to 1.5f to see noticeable a difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top