Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

*.jpg file degradation due to zipping ?


  • Please log in to reply
6 replies to this topic

#1 ojoverde

ojoverde

  • Members
  • 6 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:50 AM

Posted 25 May 2017 - 08:59 PM

It is my understanding that a *.jpg file loses a fraction of its resolution each time it is copied, due to its compression processing algorithm -- (correct me if I'm wrong).

 

Suppose instead that the .jpg file, (or a document containing .jpgs) is zipped with an archival program, (for example, WinRAR). 

 

My question:  Is the .jpg resolution similarly degraded during the zipping/unzipping process ?  Or is this a "lossless" process ?  Or is it program-dependent?

 

Thank you very much for your thoughts.



BC AdBot (Login to Remove)

 


#2 unopie

unopie

  • Malware Study Hall Senior
  • 218 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States
  • Local time:10:50 PM

Posted 25 May 2017 - 09:29 PM

If there is any degradation, I'd say it's negligible (if you don't choose some crazy compression that is), however this is a very interesting subject. WinRar and normal zipping won't do anything

 

Here are some links that are relevant:

 

https://en.wikipedia.org/wiki/Generation_loss

https://www.thoughtco.com/jpeg-myths-and-facts-1701548



#3 smax013

smax013

  • BC Advisor
  • 2,329 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:09:50 PM

Posted 25 May 2017 - 11:15 PM

Depending on the quality level (i.e. compression level) you use for the JPG image, using ZIP or other archival/compression program will likely not gain you much since the image is likely already compressed quite a bit. You would really only want to ZIP an image file if the image file was in some non-compressed format such as TIFF. The exception is if you wanted to "combine" a number of picture into one ZIP archive for emailing or other transfer purposes so that you only need to "move" one file rather than many.

#4 ojoverde

ojoverde
  • Topic Starter

  • Members
  • 6 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:50 AM

Posted 28 May 2017 - 01:17 PM

If there is any degradation, I'd say it's negligible    WinRar and normal zipping won't do anything

 

Here are some links that are relevant:

 

https://en.wikipedia.org/wiki/Generation_loss

https://www.thoughtco.com/jpeg-myths-and-facts-1701548

 

unopie:  I am comforted to know that "WinRar and normal zipping won't do anything" -- as that is exactly what I wish to do !   However, now after thinking about it a bit, I see two ways that your point may be interpreted:  Do you mean that they won't accomplish anything, or that they won't degrade anything (i.e. the image resolution)?  Please clarify.  TYVM.

 

Also, thank you for the links -- both are very relevant and helpful.

 

The exception is if you wanted to "combine" a number of picture into one ZIP archive for emailing or other transfer purposes so that you only need to "move" one file rather than many.

 

smax013:  You have described my intent exactly !    Thank you for the confirmation.



#5 GoofProg

GoofProg

  • Banned
  • 224 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:07:50 PM

Posted 04 June 2017 - 06:24 PM

When you copy the jpg from the original and resave it under a jpg then it loses information.  this is because the jpg algorithm is ran on the jpeg image again. Zipping doesn't degrade the file.  It is resaving as a jpeg.



#6 ojoverde

ojoverde
  • Topic Starter

  • Members
  • 6 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:50 AM

Posted 05 June 2017 - 02:37 PM

Thank you, GoofProg.  O.K., I got it: Zipping doesn't degrade the file.

 

But still unclear to me, does Unzipping degrade the file?  I think you are saying yes it does, because unzipping includes re-running the jpg algorithm.  Am I understanding correctly?



#7 BeigeBochs

BeigeBochs

  • Members
  • 18 posts
  • OFFLINE
  •  
  • Local time:06:50 PM

Posted 14 June 2017 - 09:44 PM

It is my understanding that a *.jpg file loses a fraction of its resolution each time it is copied, due to its compression processing algorithm -- (correct me if I'm wrong).

"Copy" is the wrong word. When you copy one file to another, both files are perfectly identical.

A .jpg file is graphics data encoded with a lossy compression algorithm which uses special mathematical techniques to reduce the quality of the original graphical image and make its disk footprint much smaller. When you open a .jpg file, you are decoding it to see the reduced-quality image it contains. Now if you then take that image you decoded and elect to save it to another .jpg file, you are not copying but re-encoding the picture data and in effect running it through lossy compression yet again, further reducing the image quality.

Suppose instead that the .jpg file, (or a document containing .jpgs) is zipped with an archival program, (for example, WinRAR). 
 
My question:  Is the .jpg resolution similarly degraded during the zipping/unzipping process ?  Or is this a "lossless" process ?  Or is it program-dependent?
 
Thank you very much for your thoughts.

The answer is no. Compressing a .jpg file into .zip or .rar file involves a lossless compression algorithm which encodes data in such a way that it takes up less space yet can be decoded back to the exact same data which went into the compressed file. Although in the case of .jpg files, reduction in size into a .zip file or any compressed archive format is extremely minimal since JPEG data is mostly non-compressible.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users