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

Data loss on file rotation?


  • Please log in to reply
7 replies to this topic

#1 saluqi

saluqi

  • Members
  • 653 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:southern San Joaquin Valley, Calfornia
  • Local time:04:57 AM

Posted 03 October 2015 - 11:39 AM

My question actually ranges a bit farther than that.  Scenario: I use IrfanView for most photo viewing and manipulation, especially the simple stuff (cropping, reducing size for mailing, etc.).  Photoshop is great for publication work, but overkill for E-mail.  Most of my photos are taken with a Nikon D600 giving .jpg images 6016 x 4016 pixels.  Today I migrated several thousand image files from my Win 8.0 laptop to my Win 7 Pro desktop.  I shoot, depending on subject matter, a mix of vertical format and horizontal format images.  When viewing those photos on the Win 8 laptop, IrfanView automatically displays them correctly (vertical format vertically, horizontal format horizontally).  When I move the same files over to the Win 7 Pro desktop, the vertical format ones are displayed horizontally.  File size typically 13.3 MB.  If I rotate such a picture so it appears in the correct vertical format, the file size changes to 12.4 MB - regardless of whether I do that in Windows Picture Viewer or in IrfanView.  So the same photo is displayed correctly in vertical format on the laptop, file size 13.3 MB, but on the desktop it appears horizontally and if I rotate it into the vertical position the file size shrinks to 12.4 MB.

 

So what is happening here, am I really losing information (given that JPEG is a "lossy" compression algorithm) and why does IrfanView autocorrect the display format on the Win 8.0 laptop but not on the Win 7 Pro desktop?

 

I started off as a Leica photographer 68 years ago (at the age of 15) so I am a bit of a paranoid fanatic about image quality.  Digital is of course a different game, and especially it lets you collect thousands of images in a short span of time,  Shooting film in a 35mm SLR you are very conscious of 36 exposures and then having to reload, so your approach is quite different . . . and if you are shooting for instance wildlife or hunting action there's a lot to be said for the digital capabilities - though I have some amazing aerial falcon action shots taken long ago on 35mm Kodachrome, no less.  But even then fast shooting was relevant, I had 4 motor driven Nikons slung around me, each with a different length lens (changing lenses takes WAY too long, especially when you are bucketing across the desert at 80 mph), and at least 500 rolls of Kodachrome in the freezer at all times <G>.  And fairly often I had to send the Nikons in to the factory to have the dings and dents taken out . . . which they did with amazing efficiency.  Very quick, and what you got back looked like a brand new camera - but with the same serial number as before <G>.

 

The images on the laptop were downloaded directly from the camera's memory card.  If I were really after the ultimate niceties of color tone, etc., I would be shooting RAW instead of JPEG, but the trouble with that is that RAW image files are much bigger and so fill up the camera's buffer much sooner.  That limits the burst length of rapid-fire shooting, and burst length is of the essence when you are shooting high speed action.  Can't have everything <G>.

 

Right now I am concerned with getting the images over to the desktop with no loss of information, and with finding out if the rotated ones have in fact lost information - and if so, how to avoid that loss while transferring the images and viewing them on the desktop.

 

As always, thanks for enlightenment.



BC AdBot (Login to Remove)

 


#2 rp88

rp88

  • Members
  • 3,082 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:12:57 PM

Posted 03 October 2015 - 03:26 PM

"Shooting film in a 35mm SLR you are very conscious of 36 exposures and then having to reload, so your approach is quite different..." Oh how true, I remember when I had a camera that used photographic film on reels of 36 frames, and the day I switched to a digital camera.
Back on this site, for a while anyway, been so busy the last year.

My systems:2 laptops, intel i3 processors, windows 8.1 installed on the hard-drive and linux mint 17.3 MATE installed to USB

#3 saluqi

saluqi
  • Topic Starter

  • Members
  • 653 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:southern San Joaquin Valley, Calfornia
  • Local time:04:57 AM

Posted 03 October 2015 - 11:40 PM

I started with an old Leica, about 1925 vintage.  Model G, I think.  Excellent camera, excellent lens (f:3.5 Elmar), you wound the film onward by turning a knob.  Then graduated to my father's 9 x 12 cm Zeiss Ikon, using sheet film, it had all the architectural capabilities (my father was an architect).  From there to a 4 x 5 Speed Graphic, the press camera of that day.  My first SLR was a Kine Exakta, for which in the end (having moved to Germany as a postdoctoral) I had several lenses.  Good camera actually, but oddball in several ways.  From there to Pentax and eventually, on arrival in Saudi Arabia in 1970, to Nikon where I have been ever since (with episodes of Hasselblad, Rolleiflex, Rollei SL 66, etc.).

 

Digital is really different, you have to re-think your whole approach to image making.  In my film days I did a lot of B+W, did all my own darkroom work (in fact I usually ran the University darkroom in whatever institution I was in).  You can do things with film, especially in black and white, that are very hard to achieve with digital media.  Tones and textures . . .   So on getting back into photography, almost entirely digital (I still have two 35mm Nikon F2s, but don't use them very often) I am still reinventing my approach to the art.  Mostly wildlife and falconry and coursing action so far, but am beginning to move back toward "art" photography again.  The aim - so difficult of achievement - is striking and unusual images that also tell a story . . .



#4 saluqi

saluqi
  • Topic Starter

  • Members
  • 653 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:southern San Joaquin Valley, Calfornia
  • Local time:04:57 AM

Posted 09 October 2015 - 11:08 PM

OK, forget the personal-historical distraction, I still want to know what happens to those rotated images that makes their file size smaller.  Is that just a consequence of re-doing the JPEG algorithm with the same color blocks in different places on the screen, or is it something more subtle that I am failing to understand?  I mean, I have a rudimentary understanding of file compression algorithms, but nowhere near enough to figure out what's going on here.  The pictures I'm rotating just now are photos of well drilling equipment and operations, intended eventually for large-photo wall-display images (say 30 x 40 inches) - to decorate our offices, I am after all an embattled water district manager and need all the good PR I can generate.  Basically what I have to do is convince some skeptical or even hostile members of our community that we are actually doing things for their benefit.  Big pretty photos will help.  At some later point - assuming I am still employed and still alive - I will go back to more demanding "art photography" stuff, where I would be jealous of ANY loss of image quality.  Wildlife photography under Chinese-painting influence, if that makes any sense.  Actually my influences/mentors have been extremely various and I find it almost meaningless to talk about this stuff.  "One picture is worth a thousand words" is trite, actually they are on completely different planes and words - at which I am said to have some skill - are more or less beside the point.  Two different worlds.

 

I would be content if somebody can point me toward somewhere I can look this stuff up.  It's not obvious to me why the auto-rotated photos retain their original file size, while the ones I rotate myself, whether in IrfanView or in Windows Picture Viewer, lose nearly 10% of their file size.  I can only think that the auto-rotated ones are not really rotated, but only displayed that way (which would explain why they turn up un-rotated when I import them to Win 7 from Win 8).  But then what is the magic by which IrfanView autorotates them in Win 8 but not in Win 7?

 

Thanks for any enlightenment, I am somewhat baffled here.



#5 Chris Cosgrove

Chris Cosgrove

  • Moderator
  • 7,209 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:12:57 PM

Posted 18 October 2015 - 06:25 PM

Nice to meet another Irfanview fan ! 

 

You need to have the plug-ins installed, then there is an option under the 'Options' menu heading for 'lossless' JPEG rotation and cropping. If for some reason you don't have the plug-ins you can get them from the same place you got Irfanview  -  www.irfanview.com

 

Chris Cosgrove



#6 saluqi

saluqi
  • Topic Starter

  • Members
  • 653 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:southern San Joaquin Valley, Calfornia
  • Local time:04:57 AM

Posted 18 October 2015 - 08:08 PM

One of the things that appealed to me about IrfanView (apart from the enormous practicality <G>) was that when (now some years ago) I asked a support question, I immediately got a helpful E-mail from Irfan Skiljan himself.

 

And yes, I have the plug-ins installed <G>.

 

In the meantime I have found some explanation of how and why image quality is lost by rotation - unless the picture dimensions are both exact multiples of 8!  What the IrfanView lossless tool does, AFAIK, is clip off edges, if necessary, to reach those proportions.  That very minimal cropping is unlikely to be even noticeable (and for many photographers might actually improve the image <G>).

 

Two interesting Web sites that explain how the data loss in rotation works are:

http://petapixel.com/2012/08/14/why-you-should-always-rotate-original-jpeg-photos-losslessly/

https://www.raymond.cc/blog/rotating-photos-or-pictures-in-windows-photo-viewer-causes-quality-loss/



#7 Chris Cosgrove

Chris Cosgrove

  • Moderator
  • 7,209 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Scotland
  • Local time:12:57 PM

Posted 19 October 2015 - 05:30 PM

I have to admit it is not a process I had given a great deal of thought to but your statement that it requires an exact multiple of 8 makes sense. I must make a few minutes to have a look at those two links.

 

By conincidence I had to take my rusty, sorry trusty, Nikon into our local camera specialists -Cameratiks in Edinburgh - following it being dropped while on a recent working holiday. Happily all it needed was a new lens hood, this had taken the impact. In their repair department they have two displays of mainly Leica cameras which, since they all have price tags, are presumably for sale. Impressive the way they hold their value - a 1937 Model 3 £ 675, not bad for an eighty year old camera !

 

Chris Cosgrove



#8 saluqi

saluqi
  • Topic Starter

  • Members
  • 653 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:southern San Joaquin Valley, Calfornia
  • Local time:04:57 AM

Posted 20 October 2015 - 07:30 PM

The exact-multiples-of-8 requirement is a consequence of the way the JPEG algorithm works.  It processes image data in 8-square blocks.  The compressed image is not a bitmap, there's no one-to-one correspondence with image locations, so unless your image exactly fits the 8-square blocks, uncompressing and recompressing it will always lose some data.  There's a much better explanation on those Web sites.  I had to fumble around a bit before finding them.

 

Banging around the desert hung about with 4 Nikon F2s, each with a different lens, shooting falconry action at 80 mph over any old terrain, the cameras got battered after a while.  My R&R spot in those days was Zürich, Switzerland (my wife was from there). I'd turn the beat-up bodies in to Nikon CH, and get them back ten days or so later looking like factory new, but with the same old serial number.  I still don't know how they did it (I mean, those cameras had real dents, and bare metal showing), but I didn't feel like arguing.  They worked, too, I never had a malfunction.  The cost was nominal.  Impressive service, to say the least.

 

Leicas have always been exceptionally rugged, and their service for professionals is outstanding, or at least used to be, back when I was in touch with such things.  In those days Leicas were a bit out of my price class, but some of my colleagues used them.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users