Steve's Digicams Forums

Steve's Digicams Forums (https://forums.steves-digicams.com/)
-   Tips & Tricks (https://forums.steves-digicams.com/tips-tricks-71/)
-   -   Rotate without Quality Loss for JPG Images (https://forums.steves-digicams.com/tips-tricks-71/rotate-without-quality-loss-jpg-images-28936/)

jdmba Jul 7, 2004 6:12 PM

Greets,

I have the S500 Canon and shoot in highest res. Despite the camera knowing which orientation it has, all pictures come out as standard, rather than having the proper orientation.

The S500 stores in JPG format only. I am afraid of opening the pictures in Photoshop to rotate them because then I am saving a JPG based on a JPG.

Am I being silly? Are there programs which can rotate without compressing a compressed image? HELP!

Thanks

stcanard Jul 7, 2004 6:48 PM

Yes there are programs that will do this, you should be able to find some with a google search.

The one I use is called jpegtran (it's a commandline app). If you use a mac here's a way to create a drag-and-drop lossless rotater:

http://www.macosxhints.com/article.p...825&query=jpeg

Something similar should work for PC's.

Alan T Jul 7, 2004 11:53 PM

jdmba wrote:
Quote:

Are there programs which can rotate without compressing a compressed image?
The excellent freeware Irfanview from www.irfanview.com does this, singly or on whole batches of photos, and does dozens of other things as well. Everyone with a digicam needs it, regardless of what other software they have.

To avoid introducing new artefacts, just use the highest jpg quality available.That will produce a smaller filesize thanuncompressed or non-lossy formats, but still maintain adequately high quality.

"xnview" from www.xnview.com also does the same kind of thing



ignavia Jul 10, 2004 1:23 AM

Is there anything that will integrate with the Windows right-click menu? That would be magnificent!

If lossless rotation is possible, why the hell does lossy rotation exist?!!

jdmba Jul 10, 2004 1:46 AM

Well, I grabbed IrfanView, and I must say I love it. It does a great job (although it does not rotate "90 counterclockwise" --- but rather "270 clockwise").

I also sent in the 10 Euro donation he suggests because the feature is so important!

Thanks for the lead.

mekaniko Jul 14, 2004 2:58 PM

hi jdmba,

if you're using windows xp, then it has a built in program called "windows picture and fax viewer" wherein you can rotate picture clockwise or counterclockwise without any loss in quality.


hope this helps.....

Jurgen Eidt Jul 17, 2004 2:33 AM

mekaniko schrieb:
Quote:

if you're using windows xp, then it has a built in program called "windows picture and fax viewer" wherein you can rotate picture clockwise or counterclockwise without any loss in quality.
Only if the height and width are a multiple of 16. Otherwise the image gets decompressed, rotated and compressed again. Something you wanted to avoid in the first place.

dnas Nov 23, 2004 7:34 PM

You can convert it to a Tiff, then rotate it, then change it back to the highest quality JPG.

Jurgen Eidt Nov 24, 2004 4:27 PM

dnas schrieb:
Quote:

You can convert it to a Tiff, then rotate it, then change it back to the highest quality JPG.

Actually you would then just add another step:

If you rotate the JPEG with loss, you decompress the image, rotate the bits and compress them. Using TIFF you decompress, compress lossless, decompress loss less, rotate, compress loss less and then convert to JPEG.

Almost any viewer out there will rotate loss less by cropping to a multipe of 8 or 16, depending on the color sub sampling. Who cares about these few pixels ;)

segbert Nov 24, 2004 6:06 PM

JPEG compression is lossy, and introduces image artifacts that were not originally there. It has been specifically designed so that these image changes are "not normally noticable", but it does change the image whenever you compress it. Any operation that decompresses and recompresses will be introducing additional image loss at the recompression step.

This is why the Independent JPEG Group developed jpegtran, which is an algorythm that exploits the inner workings of JPEG compression to perform rotation and cropping (only) without introducing any additional JPEG loss. There are many applications that have incorporated this algorythm.

for a list of such applications see:
http://sylvana.net/jpegcrop/losslessapps.html

I have found JPEGCrops to be handy
http://ekot.dk/programmer/JPEGCrops/
You can losslessly rotate, or crop to any fixed aspect ratio. It puts a resizable box on the screen which you can expand, contract, or reposition to get the composition you want.

If you want to perfrom any other operations other than rotation or croping, such as contrast or color balance adjustment, you have no choice but to decompress, make your changes, and recompress, or leave the modified image in a non-lossy format, such as bmp or tiff.


All times are GMT -5. The time now is 4:54 PM.