Cropped images double in size - why?

This area contains the messages from the old Yahoo gcmac group after the port.
jtkarpen
Posts: 0
Joined: Thu Aug 28, 2008 7:39 pm

Cropped images double in size - why?

Post by jtkarpen »

Hi, I am cropping a bunch of jpgs (simulation images) and saving the resulting files. Much to my surprise, the cropped images are nearly twice as big as the originals. One reason to crop is to reduce the size of the movie that will be made from the set of images, so this increase in image size is counterproductive. I tried both lossless and no compression, and the same thing happened. Suggestions? Explanations? Thanks!J. Karpen
Al Treder
Posts: 0
Joined: Wed Jun 23, 2004 11:37 am

Re: Cropped images double in size - why?

Post by Al Treder »

Judy,You haven’t mentioned a crucial factor in your operation, which is the resolution of the files. Cropping removes parts of the original image, which does leave less image. However, if you then save the cropped image at a higher resolution than the original, the saved file will be larger. It will not show as much of the original image in the frame, because you removed some of it, but if you have inadvertently saved at a higher resolution, GC will have added (interpolated) pixels between the pixels you retained in order to give you the apparently higher resolution, and thus the file will be larger. The only advantage of doing that (if you had intended to do it) would be to print or display a larger frame without showing image pixelation. You wanted smaller files, apparently, so there was no advantage to saving at higher resolution.If my guess is right, you need to select an output resolution (there may be too many options in GC, but this is one of them) the same as your original files. Then cropping the images will result in smaller files, as well as smaller areas of image. One other option may be to simply save the files at less resolution (but I would advise choosing the same “quality”) than the originals, without cropping. That will also result in smaller files. Do we need to discuss the relationship between resolution (pixels per inch) and frame size (inches)? Does any of this make sense? Al“ I've always wanted to be somebody, but I see now I should have been more specific. ”-- Lily Tomlin On Feb 23, 2015, at 1:23 PM, judy.karpen@nasa.gov [gcmac] <gcmac@yahoogroups.com> wrote:Hi, I am cropping a bunch of jpgs (simulation images) and saving the resulting files. Much to my surprise, the cropped images are nearly twice as big as the originals. One reason to crop is to reduce the size of the movie that will be made from the set of images, so this increase in image size is counterproductive. I tried both lossless and no compression, and the same thing happened. Suggestions? Explanations? Thanks!J. Karpen
David L. Wasley
Posts: 0
Joined: Wed Jun 22, 2005 5:55 pm

Re: Cropped images double in size - why?

Post by David L. Wasley »

What is it that is "twice as big"?  Is it the image as presented on the screen?  Is it the resulting file size on disk?  What is the pixel density, i.e., pixels/inch?Pixel dimension is the critical factor.  An image that is 1200 x 1680 pixels can be presented to you in almost any physical size.  It depends on how many pixels constitute a given physical dimension in the output.  For example, 1200 pixels with a defined resolution of 150 pixels/inch would represent a physical dimension of 8 inches. David On Feb 23, 2015, at 1:23 PM, judy.karpen@nasa.gov [gcmac] wrote:   Hi, I am cropping a bunch of jpgs (simulation images) and saving the resulting files. Much to my surprise, the cropped images are nearly twice as big as the originals. One reason to crop is to reduce the size of the movie that will be made from the set of images, so this increase in image size is counterproductive. I tried both lossless and no compression, and the same thing happened. Suggestions? Explanations? Thanks!J. Karpen
jtkarpen
Posts: 0
Joined: Thu Aug 28, 2008 7:39 pm

Re: Cropped images double in size - why?

Post by jtkarpen »

Sorry, I mean file size on disk. I will check the original and final resolutions to see whether that has changed; I didn't alter any defaults for that but it could have happened.
jtkarpen
Posts: 0
Joined: Thu Aug 28, 2008 7:39 pm

Re: Cropped images double in size - why?

Post by jtkarpen »

I looked at the resolution and both the original and the cropped image are 72 pixel/in. So I don't see how that could result in a much larger file size.Out of curiosity, I then tried "Save As..." for one of the original images without doing any cropping. The options were set to JPEG/JFIF, 100% quality, and I clicked on each of the codec options with "show file size" on. All 3 yield a larger file for the copy than for the original, with the smallest difference being for progressive codec. I also used the default subsampling -- is that what is adding to the file size? The image size is 1419x1200 to start with, if that matters. Finally, I tried the same test with a previously cropped and saved image. This time the new (but supposedly unaltered) file is smaller than the original. Go figure.......... I'm really puzzled.
Al Treder
Posts: 0
Joined: Wed Jun 23, 2004 11:37 am

Re: Cropped images double in size - why?

Post by Al Treder »

There can be another reason why any file saved by GC is larger than the original: saving the resource fork along with the original file info. That’s another of those many options. And, you can make any file smaller by NOT including the EXIF data, but not by much. Entropy isn't what it used to beEddy Condon's Jazz Club, NY, NY - 1978 On Feb 23, 2015, at 4:35 PM, judy.karpen@nasa.gov [gcmac] <gcmac@yahoogroups.com> wrote:I looked at the resolution and both the original and the cropped image are 72 pixel/in. So I don't see how that could result in a much larger file size.Out of curiosity, I then tried "Save As..." for one of the original images without doing any cropping. The options were set to JPEG/JFIF, 100% quality, and I clicked on each of the codec options with "show file size" on. All 3 yield a larger file for the copy than for the original, with the smallest difference being for progressive codec. I also used the default subsampling -- is that what is adding to the file size? The image size is 1419x1200 to start with, if that matters. Finally, I tried the same test with a previously cropped and saved image. This time the new (but supposedly unaltered) file is smaller than the original. Go figure.......... I'm really puzzled.
David L. Wasley
Posts: 0
Joined: Wed Jun 22, 2005 5:55 pm

Re: Cropped images double in size - why?

Post by David L. Wasley »

Ah -- well in that case the increase is probably the overhead of icons, etc., that GC creates by default.Go to Preferences and select Save.  You should see something like the following.Uncheck the Resource Fork "Add when saving" and the see what the difference becomes.Another difference can come from compression.  For example JPEG compression can vary the size by several times.  I find that 90% "Quality" is good enough for many things. David On Feb 23, 2015, at 4:17 PM, judy.karpen@nasa.gov [gcmac] wrote:   Sorry, I mean file size on disk. I will check the original and final resolutions to see whether that has changed; I didn't alter any defaults for that but it could have happened.
jtkarpen
Posts: 0
Joined: Thu Aug 28, 2008 7:39 pm

Re: Cropped images double in size - why?

Post by jtkarpen »

I agree that 90% would reduce the size, as would removing EXIF and other unneeded information. But if the original is a JPG, and I just want to preserve the same image (forgetting about the cropping for the moment), wouldn't it make sense to use 100% to regain the same properties? If the resolution isn't changing, I don't understand why the file size would change. Sorry if I am being dense.
Don Sample

Re: Cropped images double in size - why?

Post by Don Sample »

Were the originals saved at 100% quality? If you open an image that was saved at 90%. crop it. and then save it at 100%, there is a good chance the cropped version is going to end up with a bigger file size. Going from 90% to 100% can double or triple the size of the file. On 2015-02-23, at 7:35 PM, judy.karpen@nasa.gov [gcmac] wrote: > > > I looked at the resolution and both the original and the cropped image are 72 pixel/in. So I don't see how that could result in a much larger file size. > > Out of curiosity, I then tried "Save As..." for one of the original images without doing any cropping. The options were set to JPEG/JFIF, 100% quality, and I clicked on each of the codec options with "show file size" on. All 3 yield a larger file for the copy than for the original, with the smallest difference being for progressive codec. I also used the default subsampling -- is that what is adding to the file size? The image size is 1419x1200 to start with, if that matters. > > Finally, I tried the same test with a previously cropped and saved image. This time the new (but supposedly unaltered) file is smaller than the original. Go figure.......... I'm really puzzled. > >
eligurwayne
Posts: 1
Joined: Fri Dec 30, 2016 3:41 pm

Re: Cropped images double in size - why?

Post by eligurwayne »

I do not see why anywhere near 100% is needed if you check it out the file size increases exponentially right near there.GC [and Preview in a smaller way] start making massive files near over 98%Try the use of 95% or something like it?
Post Reply