Problems with PNG and JPG images
VisioMultimedia
Member Posts: 4
Hi everyone,
could you explain me why my background images appear in this way on my iDevice?
As you can see, there are a lot of "circles" and the quality is bad. In fact it should be in this way:
I have this problem with PNG and JPG too, the images are in 960x640 (72 dpi). I've tried other resolutions and dpi without success. Please help me, I'm going mad!
could you explain me why my background images appear in this way on my iDevice?
As you can see, there are a lot of "circles" and the quality is bad. In fact it should be in this way:
I have this problem with PNG and JPG too, the images are in 960x640 (72 dpi). I've tried other resolutions and dpi without success. Please help me, I'm going mad!
Comments
hope this helps!
Make sure your image is a layer (rather than 'background').
Simply select 1 single pixel anywhere on your image (in a corner where no one would notice might be a good place) and either delete that pixel or use the eraser to rub away some of it's opacity.
Then save the image as a PNG with an alpha channel.
This forces the iDevice to read the image as 24bit rather than 8bit.
Result: no more banding.
Hope that helps,
- Thomas
A better way is to use photoshops save for web feature for example (I don't know how other applications work) there you can choose either a PNG24 or PNG8 format. With the PNG8 you can fiddle with the color table, and what kind of noise you use. You can check your file size on the fly. It gives you a preview of what the outcome will be. I hope this helps.
Lump Apps and My Assets
There is no need for noise or grain, bitmap images are fine for displaying gradients - in fact they are perfect, a non-bitmap (like a vector image) can do no better as it still has to rasterise to the very same RGB array - at the same resolution !! Nor do they, in any sense, have a limited colour table, they can access the very same 24bit colour depth any other image format can.
The problem with this guy's gradient is simple, the iDevice is not recognising it as 24bit, so you simply 'force' an alpha channel and - Bam ! the iDevice sees (and displays) it as 24bit . . . . with no banding.
Really, try it.
No, no, no !!! (See above)
I promise, this is just an iOS / box 2d bug, no need for noise or changing image sizes or anything like that, just force the device to read it as a 24bit file.
So with a png8 you get a small file size but banding if you do not fiddle with some noise or the color table (since most is red you might get away with no noise) and with a png24 you do not need noise at al because you have so many colors to build up the gradient. So it's a choice, png8 with smaller file size and perhaps noise or png24 with na bigger file size.
Bitmap is just a term for pixel orientated images (so non vector) that have a specific way of compressing. Like .bmp also is. I know the difference between vector and pixel orientated images. I've been playing with them for over 25 years ;p
I was trying to give a non complicated way to explain to not confuse anyone who is starting out with digital imaging... Oh it's all down the drain now
Lump Apps and My Assets
No one has said otherwise !? You said: "It is because png files are in fact bitmap images and they are not good at displaying gradients" - I was simply saying that this is not true as they are just as good as other image formats (vector was given as an example) as all formats ultimately have to be rasterized to a bitmap. In fact take a look at that nice gradient in the OP, it's a bitmap! Soon you will catch up with me then Let's swap War stories ? Aldus Freehand ? Lol. )
Here's the thing, the OP has a specific issue, his image is being read as 8bit by the iDevice due to an iOS / box 2d bug, I didn't want him to start trying new formats and adding noise or grain (and so on) when the solution is to force the iDevice to correctly read his 24 bit image as 24 bit.
Let me make you an example . . . hold on . . .
I have taken the good (non-banded) image from the first post in this thread.
I have made two copies of it in Photoshop.
The first copy on the left has had a single pixel removed from it's top right hand corner.
The second copy on the right had not been modified at all.
The first copy has an alpha channel to allow the missing pixel to be transparent, the second copy has no alpha channel.
The two images where then placed into GameSalad and put side by side in the scene, at this stage they look identical, both show a smooth gradient.
The GameSalad project was then transferred to the GS viewer on my iPad - at which stage you could see the very apparent banding in the second image.
I took a screen shot on my iPad - emailed it to myself - uploaded it to TinyPic and posted it here.
Hopefully you can see what I mean now - no need for changing file size or adding noise or trying other formats - the bitmap is fine, the iDevice just needs to be forced to read it as 24 bit.
http://www.mediafire.com/?2jzms5wh1cehgf0
Here are two identical looking smooth gradients with no banding (two copies of the OP's smooth gradient), place them in GameSalad and then transfer them to your iPod/Phone/Pad - even though the non-alpha information is identical (accept for a single pixel) one will band like crazy and the other will remain super smooth !
Thanks for that, never to old to learn. Pushing my walker forward now.
And yes, Freehand. Don't you agree it was superior to illustrator in those days? I never liked Corel draw
Lump Apps and My Assets
Thank you very much for your help!
Lump Apps and My Assets
- Q
* Designers tended to prefer Illustrator, CorelDraw, or FreeHand based on which software they learned first.
Hitler used CorelDraw.
Lump Apps and My Assets