My JPEG's are funny looking...

BlitzPlus Forums/BlitzPlus Programming/My JPEG's are funny looking...

SuperDan(Posted 2003) [#1]
When I load a JPEG into Blitz Plus and display it, it doesn't seem to be decoded properly.

If I convert a .bmp to a .jpg using paint shop pro and compression level set to best quality, then load in the .jpg to any other program it is fine with no noticable difference from the original .bmp. But, load it into B+ and the quality is very bad to say the least. I don't see any flag options for decompression level or anything like that.
Can anyone help as I need my files to be .jpg? Taa muchly. Dan.


Bremer(Posted 2003) [#2]
I have noticed that the areas that you thought were black and therefore masked got patches of dark grey which is almost black but which doesn't let the background be seen through. Only by using BMPs have I been able to get around this.


SuperDan(Posted 2003) [#3]
Yes, had that too. This happens in Blitz+1.11 and Blitz+1.34.

Hactually, I now don't need to use JPEGs, can compress GIFS.

Anyone else had same problem or know of a solution?


Anthony Flack(Posted 2003) [#4]

I have noticed that the areas that you thought were black and therefore masked got patches of dark grey which is almost black but which doesn't let the background be seen through. Only by using BMPs have I been able to get around this.



It's the phenomenon known as "jpeg artifacting" - nothing to do with blitz, but to do with the way Jpegs compress data. Basically, if you use a jpeg, you can NEVER NEVER depend on a pixel being exactly what colour you think it should be. Ever. If you need pixel-perfect colour, choose a different file format. Like bmp. Or png. Or gif. Or store your mask information in a seperate file and write it onto the jpeg at runtime (as I do).


SuperDan(Posted 2003) [#5]
If this isn't a blitz problem, how come areas that are totally black in paintshop pro, remain totally black in other apps such as paint, photoshop etc? I think if a picture is saved as a JPEG in the highest quality mode, the pixels are not encoded, just the colours. So areas of total blackness rgb 0,0,0 remain black throughout. Though colors which are quite dark can be coded as black. I've noticed the same thing when using MPEGS and AVI's with blitz.


GfK(Posted 2003) [#6]
Anthony is right - If you're using masking, avoid JPG format. The compression algo used means that pixels which were originally black, may not be *after* compression/decompression.
If this isn't a blitz problem, how come areas that are totally black in paintshop pro, remain totally black in other apps such as paint, photoshop etc?
Nope. This example was made in Photoshop 6. The black circle was drawn with the hard-edged "pencil" tool. This is the result after saving as a JPG with minimum compression:

Try PNG instead. Good compression, no loss of quality.
I need my files to be .jpg
Why? JPEG has no advantage over PNG...


SuperDan(Posted 2003) [#7]
Thanks GFK. I will use PNG. I didn't know what they were or that blitz supported them.