Sign in to follow this  
Ketenks

Resizing of Images: Lossy or Not?

Recommended Posts

So let's say I have a 1200 x 1200 pixel image and I resize it to 2400 x 2400. If I undo the resize I expect that I could resize and undo the resize over and over with no loss of information right?

 

But let's say I save the image and then reopen the image and resize it back to the 1200 x 1200 resolution. Would this then be lossy? And if so, wouldn't there be a way to make it not lossy if all the transformations are done within paint.net? Couldn't you effectively reverse the resize transformation regardless?

 

Maybe it isn't lossy! Let me know how paint.net handles these sorts of things.

Share this post


Link to post
Share on other sites

I can't figure out why you are creating this problem for yourself. Why re-size and then un-size? Why not just maintain two images? Anyway saving as BMP, TIFF, and PNG can be lossless formats, but I can not see the logic in re-size and then un-sizing an image when you can have a collection of images at a variety of intermediate sizes. Saving an image and then coming back to it to do more work on it is the function of a lossless format. Once you actually alter the size of an image by adding or subtracting actual pixels is a guarantee for data loss.

 

Edited by HyReZ

Share this post


Link to post
Share on other sites
1 hour ago, HyReZ said:

I can't figure out why you are creating this problem for yourself. Why re-size and then un-size? Why not just maintain two images? Anyway saving as BMP, TIFF, and PNG can be lossless formats, but I can not see the logic in re-size and then un-sizing an image when you can have a collection of images at a variety of intermediate sizes. Saving an image and then coming back to it to do more work on it is the function of a lossless format. Once you actually alter the size of an image by adding or subtracting actual pixels is a guarantee for data loss.

 

I understand that. You're not answering my question.

Share this post


Link to post
Share on other sites

I think I understand at this point, that the only way to resize an image in a lossless way is to save the original image and always resize from that. So it makes sense that paint.net would not hold onto every image like this. But yeah, I can just hold onto all the images I need.

Share this post


Link to post
Share on other sites
1 hour ago, Ketenks said:

So let's say I have a 1200 x 1200 pixel image and I resize it to 2400 x 2400. If I undo the resize I expect that I could resize and undo the resize over and over with no loss of information right?

 

But let's say I save the image and then reopen the image and resize it back to the 1200 x 1200 resolution. Would this then be lossy? And if so, wouldn't there be a way to make it not lossy if all the transformations are done within paint.net? Couldn't you effectively reverse the resize transformation regardless?

 

Maybe it isn't lossy! Let me know how paint.net handles these sorts of things.

 

It depends on the resize method used.

 

If you use the "Nearest Neighbor" method of resizing up and use it again to resize down, YES it is safe--you won't lose any information.

 

resize.png

 

Share this post


Link to post
Share on other sites
1 minute ago, BoltBait said:

 

It depends on the resize method used.

 

If you use the "Nearest Neighbor" method of resizing up and use it again to resize down, YES you won't lose any information.

Ok cool. I will check that out.

Share this post


Link to post
Share on other sites

You can verify that there is no loss of data by doing the following:

 

Open your image, and load your modified image in a separate layer... change that layer's blending mode to XOR.  All changes will be highlighted in white.  If the resulting image is solid black, there are no differences between the two layers (images).

Share this post


Link to post
Share on other sites
1 minute ago, BoltBait said:

You can verify that there is no loss of data by doing the following:

 

Open your image, and load your modified image in a separate layer... change that layer's blending mode to XOR.  All changes will be highlighted in white.  If the resulting image is solid black, there are no differences between the two layers (images).

So that's what that is for. Neat. Thanks. I'm mostly going to compare the Best Quality option with the Nearest Neighbor option and see the trade offs.

Share this post


Link to post
Share on other sites

Now hold up. This is what I got doing that:

image.thumb.png.1acf00059d63a43acf437598a507fa81.png

I resized it from 1024 x 781 to 2000 x (maintained ratio) using Nearest Neighbor, then I resized it back to the size using nearest neighbor. Then I pasted the original image in the top layer and gave it XOR blend mode and got this. When I doubled the size and then halved the size it did give me a black screen in the blend mode though. So I guess it only works with doubling and halving the size.

Edited by Ketenks

Share this post


Link to post
Share on other sites

XOR can be used for creating abstract art or glitch art. Actually, it works better with other binary modes if one were to create abstract art.

 

Also, nice find, could be turned into a filter, but that's not necessary when there are other similar result filter.

Share this post


Link to post
Share on other sites
21 minutes ago, Ketenks said:

I guess it only works with doubling and halving the size.

 

That was in your original requirement!

Share this post


Link to post
Share on other sites

It will probably never truly work since once you have saved the adjusted file; you have added or deleted pixel data that can't be faithfully recovered by sampling adjacent pixels. You would need a non-destructive process that stores an unaltered map of the original image that can be referenced for later iterations. That is what Adobe does in its Smart Object imaging process. Paint.NET can't do the Smart Object process, yet!

 

Edited by HyReZ

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this