png or jpg ???
BlitzMax Forums/BlitzMax Beginners Area/png or jpg ???
| ||
I've developed a menu sysytem with png graphics.... but they seem a bit pixelated - I am tempted to try implementing jpeg buttons instead - pros/ cons anybody ? Thanks - BP. |
| ||
Jpeg doesn't support transparency, so unless you want to have two images, or all your menu things are square, you should use PNG. PNG isn't any more pixelated than jpeg anyway unless you've done something to them to make them that way. Like making them lower res or reducing the colors too much. |
| ||
I agree, jpeg will give you even less quality and fewer options. Maybe show us a screenshot of what the pixellation looks like. |
| ||
If you're having problems with pixellation then your images are either too small, and/or you are using maskblend instead of alphablend. Whichever, changing to JPG is only going to make it worse. |
| ||
Yes, I'm running a full screen at 800 by 600, I've scaled my buttons up to 70 by 70 pixels (from 44 by 44 @ 72 dpi) with an increase from 72 dpi to 144dpi in Ifranview. I've created the buttons first in MSoft Pictur it -- initiallthe images are Huge.... I'm scaling them down using Irfanview. I presume theres no drawback to ramping up the dpi to say.... 288 dpi (or more ?) as long as your not going to be printing the images? Thanks for the replies. |
| ||
70x70 images will get scaled up to 128x128 internally. 44x44 will become 64x64. This might explain the pixellation you're experiencing. Forget DPI. Doesn't make any difference unless you're printing images. All that matters is image width and height. |
| ||
2 tips that might help: 1. (as GFK said) use only power of 2 textures (64x64 - 128x128 - etc..) 2. if you plan on rotating the images, pad the edges with 2 or 3 pixels of blank space. |
| ||
png for sprites, logos etc. jpg for full screens images. |
| ||
Upscaling *any* image will make it look more pixelated. If anything, JPG will add compression artifacts on top of that. For best results, use graphics that are either native sized, or the biggest resolution you'd need and scale them down for the lower resolutions, rather than the other way around. |
| ||
BMP - No compression. PNG - 256 COLOUR , loss-less compression. JPEG - True COLOUR , lossy compression. |
| ||
PNG - 256 COLOUR , loss-less compression. No, that's wrong. PNG can have all sorts of levels of color, including the most common, 32 bit. |
| ||
yep png is 32 bit tht's 24 bit colour and 8 bit transparency. |
| ||
I think Gav was confusing PNG with GIF (original spec). That format was 256 colour, loss-less. |
| ||
I thought perhaps that actually PNG can do up to 16 bits per color channel, meaning it supports 64 bit truecolor? Or maybe I am thinking of something else. You might possibly find also that some jpeg loaders apply `smoothing` which possibly might make the buttons look more smoothed out and blurred which gives an impression that they are not so `pixellated`, as if the png buttons had been `sharpened`. ? |
| ||
I thought perhaps that actually PNG can do up to 16 bits per color channel, meaning it supports 64 bit truecolor? Or maybe I am thinking of something else. It rings a bell, but I think it might be an unofficial "branch" of the PNG format, rather than something officially recognised by the PNG Development Group. Incidentally, I don't think Gav was confused nor indeed was he strictly wrong. There is a 256 color 1 bit alpha version of the PNG format, it's just not the only one. |
| ||
I think that PNG is better choise... |
| ||
I tend to use png's more than jpg's. But that is just my preference |
| ||
If you save them both as zero compression. (Well 100 Quality for Jpeg and 0 Compression for Png), are they then of the same quality? |
| ||
You can compress the PNG at no compression or at absolute highest compression it will not change the image quality. A jpeg at `100%` quality still loses some quality but it might not be enough to be noticeable unless you compare the two alongside each other. |