41 votes

If an image is rotated losslessly, why does the file size change?

This is most likely caused by entropy coding, which is the final lossless stage of JPEG compression, after the image data has been quantized to reduce its size. When a JPEG image is losslessly ...
26 votes

If an image is rotated losslessly, why does the file size change?

I went ahead and repeated the experiment to see if I could figure out what's going on. Procedure I generated a random 256-by-256 pixel RGB image using the "Solid Noise" filter in GIMP (Filters > ...
20 votes

If an image is rotated losslessly, why does the file size change?

EDIT: This answer was posted before I knew that the files had increased in size by around 9 KiB (9055 bytes for the 256×256 image, 9612 KiB for the 512×512 image). In all likelihood, when you first ...
  • 31.6k
13 votes

How can I physically rotate a digital photo under Linux?

You can use cross-platform open source software jhead, with the options jhead -autorot *.jpg Which losslessly rotates the images based on the embedded rotation flag (and removes that flag, of ...
  • 142k
10 votes

How I can losslessly rotate photos?

One way to rotate a photo losslessly (without decoding/reencoding) it to change the EXIF data that specifies the rotation (this data is set by the camera, depending on its orientation when the picture ...
  • 18.3k
7 votes

How can I physically rotate a digital photo under Linux?

The command line program jpegtran can losslessly rotate JPEGs on Linux. From the command line: jpegtran -rotate 90 MyJpeg.jpg > MyJpegRotated.jpg If you don't have jpegtran program installed, ...
  • 171
5 votes

How I can losslessly rotate photos?

IrfanView can indeed rotate JPEG images in a lossless way, and it indeed needs the JPG_TRANSFORM plugin to do that. Luckily that plugin is already included in a normal install of IrfanView. To check ...
5 votes
Accepted

Is the Canon 1D-X camera's slight angle of rotation stored in the metadata?

As far as I know the answer is no, roll/pitch data is not recorded in EXIF data. I have a 60D which also offers a "digital level" or "artificial horizon" when composing a shot but this information is ...
5 votes
Accepted

What application can rotate a TIFF without re-encoding it?

It is possible and even trivial but I am not aware of any application to do that task specifically. There reason why the file size changes when rotated is that TIFF files are encoded losslessly as ...
  • 102k
4 votes

How to create an image which keeps on rotating dynamically?

Some companies choose to render such images on computer instead of actually photographing and composing then in an animation. If we are to talk ONLY about photographic processes, one would place the ...
  • 692
4 votes
Accepted

Is exiftran still needed today for resetting the orientation of JPEG images?

Since more then ten years I use exiftran to rotate images after getting them from the camera. Is this step still needed today? Yes. Don't browsers and other image apps rotate the image correctly ...
  • 26.7k
4 votes
Accepted

Why shouldn't raw files be rotated?

You can't actually rotate any file. You only can rotate images, then save those images to a file. But it is usually not possible to write (in the sense of changing the sensor data) RAW files; it would ...
  • 6,966
4 votes
Accepted

How do I use exiftool to strip all exif tags except rotation?

Duplicate of this StackOverflow question exiftool -all:all= -tagsfromfile @ -exif:Orientation /path/to/files -all:all= removes all data, then Orientation is copied back into the file with the -...
  • 3,553
4 votes
Accepted

How can I physically rotate a digital photo under Linux?

In current Linux Mint you should have had Image Magick installed. Use the -auto-orient option. convert -auto-orient source.jpg target.jpg Note: This operation isn't lossless but you can combine ...
3 votes

How can I physically rotate a digital photo under Linux?

The reason for the error is probably that the photo dimensions (2150, 3226) are not multiples of 8. Then a jpeg photo cannot be rotated totally lossless. Why it's complaining about the 65500 pixels ...
3 votes
Accepted

How to fix rotation orientation of multiple images in a Lightroom?

In the Lightroom filter bar, you can filter by aspect ratio. Select "Portrait" or "Landscape", depending on which images you want to change, then select all photos displayed (Ctrl-A) and rotate them.
  • 6,966
3 votes

Does rotating a photo count as a destructive editing?

For years I have used ACDSee to perform lossless JPEG rotation, very handy and fast. Recently I discovered that Windows (7) Explorer has a (Right-Click) Rotate Clockwise and Rotate Counterclockwise ...
3 votes

If an image is rotated losslessly, why does the file size change?

Without reverse engineering the jpeg en/decoder it's impossible to say for sure. There are actually a number of jpeg standards and contrary to popular belief, not all of them can be modified without ...
  • 9,539
2 votes

Why do some pictures rotated with exiftran have a vertical line on the right?

The JPEG algorithm uses a combination of lossy and lossless steps. The algorithm breaks up an image into 8x8 blocks, known as Minimum Coding Units (MCU). If an image has dimensions that are not ...
  • 26.7k
2 votes
Accepted

What's an easy way to de-rotate astronomical images taken without an equatorial mount?

The Hugin panorama stitcher can be used to align pictures. The align_image_stack executable is part of Hugin and can be run as a standalone command line program. To align pictures im1.tif im2.tif, im3....
  • 3,576
2 votes

Lightroom: Wrong rotation on export

Either that or Lightroom is writing the images rotated in the correct orientation, but leaving the EXIF tags in place, causing software to rotate it wrong. I would check what LR is writing using ...
  • 2,195
2 votes
Accepted

Why does Jhead with the -autorot option fail to fix my photos' orientation?

This is a case of everything working as intended, but having incorrect input (i.e., garbage in, garbage out). Two images, the original and after running jhead -autorot, should both display the same on ...
  • 31.6k
1 vote

What accuracy is needed for polar alignment when shooting time lapse of celestial objects?

I've marked @Grimaldi's answer as the answer to my question, but I still want to explicitly quote the section of the referenced article that has the exact answer I want: In other words, we would ...
  • 113
1 vote
Accepted

What accuracy is needed for polar alignment when shooting time lapse of celestial objects?

A misalignment of 1'' leads to a drift of 0.23''/min when the telescope is pointing to the Zenit. See here (in german) Have a look at these formulas here
  • 443
1 vote

If an image is rotated losslessly, why does the file size change?

Lossless JPEG rotation is only possible without introduction of boundary artifacts if the image dimensions are multiples of the block size (typically[/always?] 8). See the jpegtran man page (sorry I ...
1 vote

Why are my images from my Canon EOS 6D randomly rotated 90 degrees

Unfortunately it sounds as if the gravity sensor that determines orientation is faulty. If this is the case, the camera will need repair to resolve your issue. In Canon cameras, I believe that ...
  • 131
1 vote

What can I do about non-rotated images on a digital picture frame?

Unfortunately, the only way to know for sure whether a digital picture frame will automatically rotate images for you is to try it. To avoid problems, you can rotate your images prior to copying them ...
  • 26.7k
1 vote
Accepted

How do I transform an image to match another in terms of scale/rotation/aspect ratio?

If the two images are only similar, but not taken from exactly the same place, you might want to just stick with a similar cropping, as any control-point based transform might distort your image in ...
1 vote

Is exiftran still needed today for resetting the orientation of JPEG images?

UPDATE: It looks like you don’t need anymore to physically rotate your pictures with Firefox/Opera/Chromium in Linux. For instance it did not work with Chromium Version 73.0 but it does with Chromium ...

Only top scored, non community-wiki answers of a minimum length are eligible