Jump to content

Best way to modify JPEGs without balooning


Recommended Posts

Is there anyway around the way Photoshop baloons up, for example,

JPEGs. Lets say I have a 100k JPEG file. Opening it in Photoshop

makes it expand to around 1000k. Even though I apply no changes to

the image, using SaveForWeb option to save as a JPEG, Quality 60%

gives me 1) a bigger file, 2) a lower quality file than the original.

 

Is this problem inherent with the way Photoshop works? Is there

anyway around it?

Link to comment
Share on other sites

Apologies if any of this is obvious:

 

This is indeed inherent to the way JPEG works - the degree of 'ballooning' on minimally compressed JPEGs varies according to the content of the image, but it has to do, I think, with the image resulting from 'decompressing' a JPEG not being a good source for a further compression. (Original images have features that make them more JPEG-able than the 'computed' result of the JPEG decompression).

 

The image reaches 1000k in size in Photoshop simply because this is the amount of space required to represent that given image as an uncompressed raw image (this is not a flaw, it merely shows you how useful JPEG is).

 

Quality 60% may well nominally be worse (that is, 60 is less than 100), but on the other hand, you might not always be able to see the difference.

 

The bigger problem with the 'ballooning' from loading and saving JPEGs is that you're losing information each time you do it (like repeatedly forwarding a fax). The files are getting bigger, but at the same time, fine details are getting blurred, subtle tonal changes are posterising, etc.

 

The most important thing is to limit the 'ballooning' to once only. load your JPEG, save it as a (much larger, admittedly) PSD file. Only write another JPEG after all your PS edits.

 

This won't do much for your disk space but it will prevent the wasteful xerographic loss from constantly loading and saving a JPEG, and _may_ help the final image to be a bit more compressable.

Link to comment
Share on other sites

The solution to the ballooning problem is a larger hard drive! The real problem is that you're editing JPEGs. Since JPEG uses a lossy compression algorithm, every time you open and resave the image you will lose some quality in the image (even if you don't actually change anything.) Images that you are editing should be saved in a non-lossy format like TIFF or PSD. After all editing is done, including resizing and sharpening, save it as a JPEG if you need a smaller file.
Link to comment
Share on other sites

Photoshop opens JPG files into a PSD working space. The size you see when opened is the same as if it were a TIF or PSD file. When you save it as a JPG, it is re-compressed.

 

Not all JPEG compression works the same way. Furthermore, the more detail, the greater the file size. If you sharpen in PS, for example, the file will grow on re-compression.

 

The "save for web" option takes a lot of information out of the file. The color space is reduced to 256 swatches, for example, and the resolution has to be reduced to screen-save quality. It also removes the color space setting. You get better results if you convert the original to sRGB before using ImageReady.

 

It's hard to say what the original JPEG quality is in Photoshop terms. The size is a clue. I find that Photoshop will not change the file size more than about 30% if the quality remains constant. A "fine" JPEG file from a D1x is about the same size as a Photoshop 8 or 10 quality.

 

It's a better practice to save edited JPEG files as TIFF or PSD files. If you need another JPEG or ImageReady processing, use the TIFF file as a master.

Link to comment
Share on other sites

In my opinion, GIMP is a better tool than Photoshop for editing JPEG,

giving you full control over quality, chroma sampling, preview,

and scan type.

Additionally the <B>jpegdump</B> program should be used to ascertain

your digicam's JPEG quality level. Retain the same quality level and

chroma subsampling when you save after editing.

Link to comment
Share on other sites

<b>There is NO problem.</b> JPEG is a compressed format. You could theoretically manipulate the compressed data, but this is in general an impractical waste of software engineering resources. Instead Photoshop edits the image in a decompressed state. Photoshop edits all formats in the decompressed state. Hence, <b>Levels</b> only had to be written 3 ways to handle RGB, LAB, and CMYK uncompressed data formats instead of writing it to handle the various different <b>image file formats</b>. After all, a JPEG, a PNG, a TIFF, a BMP, and etcetera were all engineered as ways of storing raster image data. Photoshop simply edits the uncompressed raster image data. <p>

 

Beyond that, within <b>Save for Web</b> I favor using no less than a quality of 65 to avoid compression artifacts in low frequency areas. The reason for the bigger file is complex and is not worth discussing at this level of detail. Let is suffice to say that compression settings differ between software applications and that unless you use identical compression settings things tend to recompress poorly in comparison to the original. <p>

 

In short, there is no problem. This is how it is supposed to work as Photoshop does not use <b>lossy</b> compression in its work. It instead works with the uncompressed data. As there are many discussions of JPEG compression already on this site I would suggest performing a search on '<b>JPEG compression</b>' on this site's forums and go from there. You might find <a href=http://www.photo.net/learn/raw/>Bob's article on file formats</a> helpful. I did not, but my introduction to this material started with IEEE journal articles and their ilk which is not something I would recommend to anyone without a highly technical background. <p>

 

hope this helps, <p>

 

Sean

Link to comment
Share on other sites

Wow! Thanks! I`ll need to further my research. This one really sparked my curiosity because sometimes I go to free image galleries, save a couple of pictures, and use Photoshop filters and actions to adjust them to my liking. It either that, or using small programs that do not have the PS armada of options and therefore less versatile. On the other hand, these same smaller programs do not seem to go through the `decompression/ballooning` process and apply changes to the image, as it were a grid of indendent points. I stil have some reading on all of this. Thanks again!
Link to comment
Share on other sites

It is (almost) impossible to edit a Jpeg without the decompression/recompression step. What you may have found is that the default quality settings in programs other than Photoshop is closer to the original file size (and quantisation settings), but this is largely an accident.

 

Please re-read my article (above).

Link to comment
Share on other sites

Thank you. Before I go back to read and analyze all this JPEG information, I want to mention a wonderful tool that could actually help me in most of my original needs. Here is the link:

 

http://www.xat.com/image_optimizer/image_optimizer.shtml

 

Rather impressive. My best test so far is taking a 30K image, adjusting levels, color correcting, sharpening it, and still wind up with a 9K file at the end. There`s so many JPEG progams out there, it`s hard to test them all. So far, this is the strongest if them, IMHO. Feel free to comment. Now back to my JPEG links. :0)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...