2

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?

Adam Tindale
  • 1,239
  • 10
  • 26

1 Answers1

2

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.

Community
  • 1
  • 1
C4 - Travis
  • 4,502
  • 4
  • 31
  • 56
  • Also, I noticed that you've built your project off of an older installer. I updated the installer last week, this one includes a bunch of fixes and new code / extensions. New documentation, examples and tutorials will be available online very soon. – C4 - Travis Jun 19 '13 at 17:50
  • Another thought, too, is that if you're planning to use full-screen images you might want to prepare your media beforehand. Mobile devices have limited memory and resources so cropping your media to the smallest possible size will help filters crunch faster, decrease load/build times, and the images will still look good on the devices. In this case I would scale your image to 1024 x 768 instead of 4096 (the iPad just does the down-scaling on the fly for you anyways). – C4 - Travis Jun 19 '13 at 18:02
  • Incredibly helpful! Thank you! – SpillYerLungs Jun 19 '13 at 22:23