How can cropping images make the file bigger?!? (7)

6 Name: 4n0n4ym0u5 h4xx0r : 2014-08-24 07:48 ID:MCMmaizc

>>1 is probably long gone, but anyway.

When you do something to a jpeg image, this is usually how an image editing program would do it:

(loading)

  1. Decompress jpeg file
  2. Convert jpeg macroblocks to bitmap
  3. Do image editing operation

(saving)
4. Convert bitmap to jpeg macroblocks
5. Throw away some amount of detail (configurable)
6. Compress jpeg file
7. Add metadata (like "CREATED BY ADOBE PHOTOSHOP LOLOL", thumbnail, date and time, etc)

Step 1 and 6 is "normal" (de)compression, like rar/zip would do. Steps 1,2,6,7 is common to almost all formats.

The clever part about JPEG is step 4, which essentially transforms the image into a form where it is easy to choose the level of detail you want to preserve.

In step 5, you throw away things that a normal user wouldn't notice. Image editing software would err on the side of caution here and preserve as much as possible, which still makes the file smaller, but not as small as it could be if you tolerate some imperfection.

If you publish online, you often use some kind of image optimizing, which would be a much more aggressive step 5, and would also get rid of almost all metadata from step 7.

My guess is that's what was done to the original image that OP had. Opening it up and re-saving means going through a sloppier step 5, keeping more data to save. The metadata could also make a difference on small images.

There are also some tools that can operate directly on the macroblock level, without going through steps 2 and 4. They can be completely lossless, and much faster, but the things you can do is much more limited (cropping and rotation mostly).

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: