Cropping photos without losing res

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
My Samsung Digmiax V3 3.1 megapixel P&S came with Digimax Viewer, which sends any viewed JPG with the click of a button to MGI Photosuite III software to crop, rotate, touchup, etc. the JPGs. The full res JPGs create with this camera are around 1.4 MB uncropped. When I go to crop one of these even slightly, the size of the resulting file is about 225 kb. Obviously, the editing program is reducing the resolution as part of the process. Am I doing something wrong? Should I use a different program to make my crops? I have a few things, including Photoshop Elements, an old version from around 8 years ago, although I don't have it currently installed.
 

vshah

Lifer
Sep 20, 2003
19,003
24
81
it could be saving the file as a lower quality JPEG. check the save as settings for JPEG quality and set it to max.

you can also try Paint.Net for a good free program

www.getpaint.net
 

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
it could be saving the file as a lower quality JPEG. check the save as settings for JPEG quality and set it to max.

you can also try Paint.Net for a good free program

www.getpaint.net
The darn program seems very lame. The options include first day of the week either Sunday or Monday and little else. :(
 

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
I downloaded and installed Paint.NET, latest stable version, 3.5.2. I don't see a way to adjust the quality settings for JPGs. I cropped a ~1.3 MB JPG, removing around 40% of the border material (i.e. retaining around 60% of the area), did a Save As and the resultant file is around 500 kb. I have to think it is also sacrificing resolution of the photo. Surely it can't be that difficult to chop off a portion of a photo without altering the content of the remainder!
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
You do lose resolution (XXX pixels x XXX pixels)....it's the nature of cropping, you're actually removing some of the picture. In addition, the jpeg compression settings will also alter file size.

When you "save as" jpeg, the compressions settings dialog should come up automatically.
 
Last edited:

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
I downloaded and installed Paint.NET, latest stable version, 3.5.2. I don't see a way to adjust the quality settings for JPGs. I cropped a ~1.3 MB JPG, removing around 40% of the border material (i.e. retaining around 60% of the area), did a Save As and the resultant file is around 500 kb. I have to think it is also sacrificing resolution of the photo. Surely it can't be that difficult to chop off a portion of a photo without altering the content of the remainder!

So...you don't expect resolution to go down when you cut away 1/2 the image!?

Of course its going to go down! You can upscale it but that's really just a waste, you can't create detail that wasn't initially there.
 

shortylickens

No Lifer
Jul 15, 2003
82,854
17,365
136
So...you don't expect resolution to go down when you cut away 1/2 the image!?

Of course its going to go down! You can upscale it but that's really just a waste, you can't create detail that wasn't initially there.
A concept folks sometimes forget when they are photo-chopping.

I use Corel Photo Paint, not because its good or a good deal for the money, but because I thats what I learned to use in Windows 3.1.
When I save a jpg or any compressed type, I always have the option to mess with the quality and compression and such.
 

akugami

Diamond Member
Feb 14, 2005
5,662
1,852
136
I think there is a confusion in terminology and concepts at times. Anyways, when you crop, it's no different than taking a physical picture and cutting the edges off of it. That is cropping. And lossless editing refers to editing an image and having no loss details when saving the final image except for the areas that were changed. For instance, after fixing redeye on a photo and saving it the only thing changed was the color of the eyes. No detail was lost or changed except in the pixels that makes up the eyes.

I think what you are trying to do is take the image, cropping it and then having the remaining cropped picture expand and fill up the space that comprises the original unedited image. Depending on the program it could be a one or two step process but the image editing program should at the least allow you to crop, and then resize the image. So I could take an image that was originally 800x600, crop it using the same aspect ratio to keep things neat (perhaps 400x300), finally resizing it back up to 800x600. Keep in mind that when you do this, depending on the quality of your original image and how much you crop and resize, it may not look as sharp and there might be artifacts (squarish pixellated blocks).
 

twistedlogic

Senior member
Feb 4, 2008
606
0
0
I don't see a way to adjust the quality settings for JPGs.

File...
Save as...

Dialog box should pop up asking for filename and where to save...

Final box should be jpeg compression, it will tell the actual file size at the top and should change as you adjust the % bar.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
238
106
As has been touched on, cropping is simply cutting out a piece of the photo. The resolution of the selected piece is actually the same as it was unless you enlarge it. When you do that, you stretch the remaining pixels to fill the expanded space, and that gives the effect of lower resolution. As was stated above, you can't create pixels that are not there.
 

vshah

Lifer
Sep 20, 2003
19,003
24
81
the resolution has been reduced, the DPI is the same until you try to make it the original size again.
 

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
the resolution has been reduced, the DPI is the same until you try to make it the original size again.
OK, this is the consensus, and I figure I understand it. Not sure cause I'm not doing it now but I am not aware of having tried to resize. All I did was crop. I did miss that the setting was 95% at save but the resultant file size was much less than I'd expect from having cropped off less than 50% of the area of the photo. When I cropped off ~40-50% of the area of the photo and saved at 100%, I wound up with around 4x the file size as the original photo! Color me a little confused :confused:
 

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
OK, this is the consensus, and I figure I understand it. Not sure cause I'm not doing it now but I am not aware of having tried to resize. All I did was crop. I did miss that the setting was 95% at save but the resultant file size was much less than I'd expect from having cropped off less than 50% of the area of the photo. When I cropped off ~40-50% of the area of the photo and saved at 100%, I wound up with around 4x the file size as the original photo! Color me a little confused :confused:

Take a 128 kbps MP3 song and cut out 10 seconds at the end. Then save the resulting file as a 320kbps mp3. The end file will be larger than the original. This is the same concept as what you are doing with the JPG.
 

Cattykit

Senior member
Nov 3, 2009
521
0
0
"The full res JPGs create with this camera are around 1.4 MB uncropped. When I go to crop one of these even slightly, the size of the resulting file is about 225 kb"

At first, by reading your title, I was going to answer there's just no way you'd be able to 'crop images without losing resolution' because cropping is cutting out resolution.

However, I see that you meant the other resolution (detail) when you said resolution (pixel values).

Now that I understand what you meant, here's my suggestion: Don't use MGI Photosuite III if it doesn't give you an JPEG compression option. For cropping and straighten purposes, try Picasa. Out of all those programs I've used so far, nothing beats Picasa on those matters.
 

vshah

Lifer
Sep 20, 2003
19,003
24
81
Take a 128 kbps MP3 song and cut out 10 seconds at the end. Then save the resulting file as a 320kbps mp3. The end file will be larger than the original. This is the same concept as what you are doing with the JPG.


exactly. and in your case OP, your camera is not saving at 100% to start with.

what res is the original and cropped picture? and are you trying to use it for print, email, or web?

if print, the original 3.1MP could result in a good 5x7 print (300dpi), or a decent 8x10 print (200 dpi). the cropped picture would obviously have to be much smaller
 

Throckmorton

Lifer
Aug 23, 2007
16,830
3
0
I downloaded and installed Paint.NET, latest stable version, 3.5.2. I don't see a way to adjust the quality settings for JPGs. I cropped a ~1.3 MB JPG, removing around 40% of the border material (i.e. retaining around 60% of the area), did a Save As and the resultant file is around 500 kb. I have to think it is also sacrificing resolution of the photo. Surely it can't be that difficult to chop off a portion of a photo without altering the content of the remainder!

It's not the resolution that's changing but the quality. You can pick what JPEG compression quality you want.
 

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
"The full res JPGs create with this camera are around 1.4 MB uncropped. When I go to crop one of these even slightly, the size of the resulting file is about 225 kb"

At first, by reading your title, I was going to answer there's just no way you'd be able to 'crop images without losing resolution' because cropping is cutting out resolution.

However, I see that you meant the other resolution (detail) when you said resolution (pixel values).

Now that I understand what you meant, here's my suggestion: Don't use MGI Photosuite III if it doesn't give you an JPEG compression option. For cropping and straighten purposes, try Picasa. Out of all those programs I've used so far, nothing beats Picasa on those matters.
Yes, I guess I was referring to pixel values there. I'm not good with the jargon and technology here. I think I'll probably have to use a different program, but I just went in with the MGI Photosuite III again and cropped a 1.2 mpixel JPG, taking off about 35% of the area. This time I noticed a checkbox for options when saving, and checking that I'm given several options one being Picture Quality. The default is 7 and maximum 10. Using the default of 7, the resultant JPG crop is 470 kb. Changing it to 10 and saving results in a JPG of 2082 kb. Neither seems right for this. I understand the comparison with the 128 kbps MP3 file, I use utilities to chop of parts of those all the time, but the resulting MP3s are 128 kbps and the file sizes are in exact proportion to the length of the track. IOW, if I cut off the last 10% of an MP3 file, the size of the saved file is 90% of the original. That's what I expected to be happening when I crop my JPGs, but it hasn't been happening! ^_^ Why? If I use Picassa or Paint.NET, will I get proportional crops (i.e. file sizes in the same proportion as the proportion of the areas of the pictures)?
 
Last edited:

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
Yes, I guess I was referring to pixel values there. I'm not good with the jargon and technology here. I think I'll probably have to use a different program, but I just went in with the MGI Photosuite III again and cropped a 1.2 mpixel JPG, taking off about 35% of the area. This time I noticed a checkbox for options when saving, and checking that I'm given several options one being Picture Quality. The default is 7 and maximum 10. Using the default of 7, the resultant JPG crop is 470 kb. Changing it to 10 and saving results in a JPG of 2082 kb. Neither seems right for this. I understand the comparison with the 128 kbps MP3 file, I use utilities to chop of parts of those all the time, but the resulting MP3s are 128 kbps and the file sizes are in exact proportion to the length of the track. IOW, if I cut off the last 10% of an MP3 file, the size of the saved file is 90% of the original. That's what I expected to be happening when I crop my JPGs, but it hasn't been happening! ^_^ Why? If I use Picassa or Paint.NET, will I get proportional crops (i.e. file sizes in the same proportion as the proportion of the areas of the pictures)?

Again, that quality setting is what's influencing things. 7 is generally lower than a camera will use, 10 is higher. I normally find a setting of 85(equivalent to 8.5) in your program results in a output that has similar file sizes to what the camera spits out.

Also understand that there is a "squaring" effect to the resolution when you crop. If I crop off 33% off the length and width. The the resulting image will be 4/9 or roughly half the initial resolution. So if I started with a 1.4MP file that will drop a bit below .7 and I would expect(jpg compression setting and image content being roughly the same) the output jpg to be a little less than half the file size of the original.
 

Muse

Lifer
Jul 11, 2001
37,511
8,103
136
Again, that quality setting is what's influencing things. 7 is generally lower than a camera will use, 10 is higher. I normally find a setting of 85(equivalent to 8.5) in your program results in a output that has similar file sizes to what the camera spits out.

Also understand that there is a "squaring" effect to the resolution when you crop.
If I crop off 33% off the length and width. The the resulting image will be 4/9 or roughly half the initial resolution. So if I started with a 1.4MP file that will drop a bit below .7 and I would expect(jpg compression setting and image content being roughly the same) the output jpg to be a little less than half the file size of the original.
I understand the math. I have a degree in mathematics. I figure that I should be getting a file size reduction % approximately the same as the area reduction. IOW, if the area cropped off is 1/2 the picture, the file size should be 1/2 the original if the quality (pixels/square inch) remains the same. Yes, I suppose the program is doing something. I wonder why they don't have a setting that simply retains the quality of the original.
 

OulOat

Diamond Member
Aug 8, 2002
5,769
0
0
Muse, the good news is that you can crop JPEG images without losing image quality. But first, you have to understand the technology behind JPEG encoding.

I'm not going into full detail here, since you can easily read about it yourself. But understand this: JPEG is a lossly format. This means that the data stored in the file doesn't contain the exact information about each pixel in the picture, but an estimation and approximation of what human eyes can see. It's just like a MP3 to music. The benefit is that you get a lot smaller file size; the downside is any modifications you make and have to re-encode will cause the quality to decrease. Key word here is re-encode; if you don't re-encode, you will not lose any quality if you save again.

Some very smart people figured out that a few modifications to a picture can be done without needing to re-encode the image. For example, rotating the image. Instead of rotating the entire image and then re-encode as JPEG, you can rotate and move each block in the JPEG file, and just save without re-encoding the image. Cropping is the same idea. Not a flexible as regular cropping, but a lossless crop can be done.

If you google "lossless jpeg crop", you will find plenty of editors for you. Personally, I use two free editors.

jpeg lossless rotator for a simple and mostly automatic way of rotating jpegs
xnview for anything else. Note that xnview is a lot more powerful tool than just lossless cropping.

FYI, editing jpegs using tools provided by Windows are all lossly transformations. That includes rotating pictures in the picture viewer (whatever they call it).
 
Last edited:

PurdueRy

Lifer
Nov 12, 2004
13,837
4
0
I understand the math. I have a degree in mathematics. I figure that I should be getting a file size reduction % approximately the same as the area reduction. IOW, if the area cropped off is 1/2 the picture, the file size should be 1/2 the original if the quality (pixels/square inch) remains the same. Yes, I suppose the program is doing something. I wonder why they don't have a setting that simply retains the quality of the original.

Don't take it as an insult to your intelligence! If you understand how the resolution is changing than the only other variable is the JPG file quality setting. Like I said, try to find a program with more variance in this area to better control the output. I think GIMP has more control.

Of course there are things that will also affect the effective compression like high frequency content like noise in the image. If you crop away areas of low frequency content then the resulting filesize won't be as different as you might expect.
 
Last edited:

vshah

Lifer
Sep 20, 2003
19,003
24
81
Another possible factor is that if you are cropping out parts of the image that contain significant detail, those areas may have been contributing more to the file size than the remaining areas. So, the resulting file size may not be directly proportional to the change in area, even at the same quality settings.

Just one more thing to consider.
 

ilkhan

Golden Member
Jul 21, 2006
1,117
1
0
OK, this is the consensus, and I figure I understand it. Not sure cause I'm not doing it now but I am not aware of having tried to resize. All I did was crop. I did miss that the setting was 95% at save but the resultant file size was much less than I'd expect from having cropped off less than 50% of the area of the photo. When I cropped off ~40-50% of the area of the photo and saved at 100%, I wound up with around 4x the file size as the original photo! Color me a little confused :confused:
Take the image, and without making any changes save as a jpg again. The file size differences are from differing compression.
Cropping is always going to reduce the file size, as you are removing information from the photo (the area cropped away). Without being able change just the cropping stuff, we can't tell whats compression differences and whats cropping differences.