• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

How do I rotate a JPG without re-encoding?

CZroe

Lifer
Jun 24, 2001
24,195
857
126
I'm trying to simply rotate an image I snapped with a digital camera. I edited using mspaint, but it re-encodes the JPEG and drops the quality significantly. I don't want to have to use something that's overkill for this (ie, Photoshop). What options do I have?
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Irfanview (link).

You will need the Plug-In pack, because the lossless JPEG rotator doesn't come as standard.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
Originally posted by: Amorphus
the windows image/fax viewer does it for me...

But doesn't save it that way for linking to / embedding in a forum post ;)

Originally posted by: Joeyman
http://www.irfanview.com/

damn Mark R beat me to it:)

Actually, Anubis did... Unless that edit was put in at light-speed ;)


Thnx all! It's not possible to crop losslessly is it? I imagine that I'd be cutting off stuff the rest of the encoding is based on...
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
Originally posted by: CZroe
Originally posted by: Amorphus
the windows image/fax viewer does it for me...

But doesn't save it that way for linking to / embedding in a forum post ;)

Originally posted by: Joeyman
http://www.irfanview.com/

damn Mark R beat me to it:)

Actually, Anubis did... Unless that edit was put in at light-speed ;)


Thnx all!

yea i won. i edited in gimp and spelled acdsee right
 

bpctech

Senior member
Sep 6, 2001
483
0
0
Originally posted by: CZroe
Originally posted by: Amorphus
the windows image/fax viewer does it for me...

But doesn't save it that way for linking to / embedding in a forum post ;)


Actually it does for me. If I rotate an image and close it that image will be saved rotated whenever I open it from that time forward. I'm pretty sure it's just a plain rotate too.
 

Amorphus

Diamond Member
Mar 31, 2003
5,561
1
0
Originally posted by: bpctech
Originally posted by: CZroe
Originally posted by: Amorphus
the windows image/fax viewer does it for me...

But doesn't save it that way for linking to / embedding in a forum post ;)
Actually it does for me. If I rotate an image and close it that image will be saved rotated whenever I open it from that time forward. I'm pretty sure it's just a plain rotate too.[/quote]

Yeah, what he said! Roar!

:wine::)
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Actually it does for me. If I rotate an image and close it that image will be saved rotated whenever I open it from that time forward. I'm pretty sure it's just a plain rotate too.

Except that this re-encodes the file, with considerable loss of quality. The original question asked for programs that can rotate JPEG files without re-compressing the file.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
Originally posted by: Amorphus
Originally posted by: bpctech
Originally posted by: CZroe
Originally posted by: Amorphus
the windows image/fax viewer does it for me...

But doesn't save it that way for linking to / embedding in a forum post ;)
Actually it does for me. If I rotate an image and close it that image will be saved rotated whenever I open it from that time forward. I'm pretty sure it's just a plain rotate too.

Yeah, what he said! Roar!

:wine::)[/quote]

Someone posted in ATOT about his "awesome" JPG compression tip... He said that he notcied no quality difference between the original and the one created by simply opening and selecting "Save As" in mspaint. I immediately saw artifacts on the horizon. I bet I'd see something ;)
 

Amorphus

Diamond Member
Mar 31, 2003
5,561
1
0
you'll have to use some program that allows you to choose what quality setting you want the JPG file at. i.e. in Photoshop, set quality at 10, so nothin is changed. of course, i dunno.
 

Nocturnal

Lifer
Jan 8, 2002
18,927
0
76
You can always download Photoshop CS trial from adobe.com. It's the entire real deal for thirty days.
 

bpctech

Senior member
Sep 6, 2001
483
0
0
Originally posted by: Mark R
Actually it does for me. If I rotate an image and close it that image will be saved rotated whenever I open it from that time forward. I'm pretty sure it's just a plain rotate too.

Except that this re-encodes the file, with considerable loss of quality. The original question asked for programs that can rotate JPEG files without re-compressing the file.

I stand corrected.


Ripped from the microsoft website...

Rotate in an image editor The Filmstrip view in My Pictures, and Windows Picture and Fax Viewer, feature the ability to rotate photos left or right. This is a handy way to turn upright a flopped vertical. But, in many cases, it?s better to perform this rotation at another point in the digital workflow, especially if you?re trying to preserve every ounce of image quality in the original photo. This isn?t true for all formats, but it is for JPEG and many RAW formats. Here?s why:

If a JPEG is rotated in My Pictures or the Windows Picture and Fax Viewer, it?s resaved. Every time a JPEG is resaved, the image is degraded slightly. The best time to rotate the picture is when it?s being adjusted in an image editor, since it has to be resaved anyway (and it can be resaved in a format like TIFF, where no additional quality loss is incurred).
If a RAW file is rotated in Windows Picture and Fax Viewer (in most cases, the rotation buttons in My Pictures are disabled when a RAW file is selected), chances are the high-resolution RAW picture data will be lost in the process. In general, this will happen with RAW files that use the TIFF file structure. This includes RAW files from the Canon EOS-1D, Nikon D-series, and Kodak DCS series cameras.


I do use photoshop elements to do all my work, but I never noticed a quality loss using the quick rotate feature in windows. I will have to change my ways.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
So much great info :)

Thnx AT!

Already used IrfanView... Now I just have to figure out if the XP Powertoy is lossless or not...
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
jpeg will have to be re-encoded when you flip the image around as it is a property of jpeg compression.

the best way to do this is to get the file in an uncompressed format and then do whatever you want with it and then save it as jpeg to retain the quality.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Originally posted by: Ameesh
jpeg will have to be re-encoded when you flip the image around as it is a property of jpeg compression.

An important property of JPEG is that it is not necessary to re-encode an image if your perform a simple transformation like flipping or rotation.

All you need to do is change the order of the pixels*, you don't need to redo the lossy parts of the process. This has been known for many years, but without any real use for it, it remained just an interesting mathematical quirk of the format until the advent of digital cameras which captured in JPEG format made it a useful techniqe.

[*]The processing is actually done on the DCT transformed data rather than the pixel data, but the net effect is the same.