Find out jpg compression level?

Miscellaneous Forums/General Discussion/Find out jpg compression level?

Does anyone know how to examine a jpg to find out what compression level was used when it was originally saved so that if you modify it you can save it with exactly the same level. This is so you don't save it at a lower level and thus make the image worse, or at a higher level and thus waste disk space on an already poor image. Or is it totally impossible, should I just save as bitmap and be done with it?

I ask this because I have a nice jpg background that I want on a title page. I will then fly a logo round over it and finally show the logo fixed on the background. But instead of using the logo as is, I will actually show a new jpg background which has the logo combined with an antialiased edge so it looks nice. But if the jpg is a different level, you will see the whole image change slightly which would be naff.

I suppose I could try to code the antialiasing of the logo(as aab says) but that would take ages as it's in Blitz Plus not Max or 3D (as I sure you can do some kind of 3D card function or perhaps just supply as mask colour range so the edge is alpha blended) Didn't sswift make some kinda bob blending thing once?

Hmm, any help is appeciated.

Loading a .jpg into Photoshop and doing Save As sets the compression to what that image was previously saved with (thus you can see the level before saving it). However, resaving as a jpg always makes an image blurrier, regardless of the compression level used, since jpg is a lossy method. So, if you have one originally saved at level 3, it'll look slightly worse even if you resave as level 10 (and significantly worse if you resave as level 3).

dman, just need photoshop then. Mind you, you seem to be saying that even saving at the same level agian will make it worse, is this true!

Why not use the lossless PNG format?

Snarkbait: Well If blitz can read it that's a good idea!

Yep, Blitz can read PNG fine.

Personaly I swear by PNG for everything but photos, its a great file format

I agree about JPEG, if you load in a previously saved jpeg and save it again at any level of accuracy it will still lose some more quality. If you need to be loading in image again and again and making modifications you should save it as a PNG or something and use that to work from.

You can probably find out the compression level of a jpeg fairly easily by finding the definition of the file format and writing a simple parser.

>you seem to be saying that even saving at the same level agian will make it worse, is this true!

yes, saving jpeg is not like bmp, etc. it takes the current image and compresses that again regardless, which results in ever-poorer quality. that is why i usually revert to a full-quality bmp until i get the quality/size i want. its the only big drawback of the format imo.

Basically I always saved as bmp after modifications anyway because I was paranoid and you lot have confirmed the paranoi, thanks. Looks like png is the way to go then.