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 ...
Ilmari Karonen's user avatar
36 votes

How to convert JPEG to RAW in Photoshop or similar?

In addition to the points Alex S made, you need to consider why they want RAW. There are several possible reasons: Bit depth as Alex S said. JPG suffers from compression artefacts which RAW doesn't. ...
Chris H's user avatar
  • 3,812
36 votes

What factors cause or prevent "generational loss" when JPEGs are recompressed multiple times?

Almost all image quality losses occur the first time an image is compressed as JPEG. Regardless of how many times a JPEG is recompressed with the same settings, generational losses are limited to ...
xiota's user avatar
  • 27k
35 votes
Accepted

Changing JPEG to RAW to use on Lightroom?

In my opinion, none of the other answers addresses the obvious misconception in the question: There is no use in converting a JPG (comparatively low quality) to a RAW file (high quality), because you ...
Ian's user avatar
  • 446
34 votes
Accepted

Remove "quality" property from JPG

In short: there is no reason to care about this value and it its presence does not make your file larger. identify -verbose filename(s) only displays the quality ...
szulat's user avatar
  • 5,059
31 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

The size of files compressed with JPEG vary depending on the complexity of the image. Trying the control the file sizes the way you describe will result in highly variable perceived image quality. ...
xiota's user avatar
  • 27k
29 votes
Accepted

How to convert JPEG to RAW in Photoshop or similar?

RAW is not (or minimally) processed image data from camera sensor. JPEG is processed image data. Typically, raw-files from modern cameras have 12-14-bit per pixel which means up to 16384 values (for ...
Zenit's user avatar
  • 1,791
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 > ...
2012rcampion's user avatar
25 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

The JPEG compression algorithm works like this: Instead of being saved as three R, G and B planes, your image is decomposed into 3 planes, one that carries luminosity, and two that carry color (aka ...
xenoid's user avatar
  • 21.3k
21 votes

What factors cause or prevent "generational loss" when JPEGs are recompressed multiple times?

Recompression loss is real, especially when working with higher levels of JPEG compression. In theory, if you re-save a JPEG files with the exact same parameters and have aligned your crop to 8×8 ...
mattdm's user avatar
  • 143k
20 votes

Is a JPG guaranteed to produce the same pixels?

Short Answer No, decoding is not guaranteed to always be the same. However, the differences are guaranteed to be very, very small. ISO Specifications The International Organization for ...
Aaganrmu's user avatar
  • 301
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 ...
scottbb's user avatar
  • 32.7k
19 votes
Accepted

Is it possible to find out what compression ratio was used for a particular JPEG?

No, you can not and it does not make sense to do so, since there is no ubiquitous definition of the JPEG compression level. The actual result when saving a JPEG with compression level 60 in one ...
jarnbjo's user avatar
  • 3,282
19 votes

Changing JPEG to RAW to use on Lightroom?

In the absence of real raw files, the JPG is your "raw". Most image editors, including Lightroom, can open or import JPGs. You may choose to save in another format while editing, but do not lose or ...
xiota's user avatar
  • 27k
19 votes
Accepted

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why? (PART 2)

The big file contains very bulky metadata that seem related to "Document Ancestors" (whatever that means), as demonstrated using exiftool(*): Small file: <...
xenoid's user avatar
  • 21.3k
18 votes
Accepted

Does converting image file formats affect quality?

Going from JPG (which is a lossy format) to any lossless one (like PNG) does not. Going from any format to a lossy one, yes, including JPG to JPG. It could be too little to notice, and using the same ...
Rafael's user avatar
  • 24.8k
18 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

No. This is a wrong approach. File size in pixels, yes, has something to do with the final weight, but it is not the only factor. Make a test. Take a completely white file of the same 2400x600px, ...
Rafael's user avatar
  • 24.8k
17 votes

JPG and file sizes - BASIC facts for dummy

JPEG is an image format with lossy compression. This means, every time you save a modified JPEG image, its quality gets slightly reduced because the algorithms used for encoding and compressing the ...
Byte Commander's user avatar
14 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 ...
mattdm's user avatar
  • 143k
14 votes

JPG and file sizes - BASIC facts for dummy

To simplify a bit, JPEG image compression splits the image into different frequency components and stores them separately. Depending on the compression settings, it also stores the higher frequency ...
Ilmari Karonen's user avatar
14 votes
Accepted

Why does the histogram of an image depends on the software that opened it?

It's all to do with the profile applied to the raw files and guesses other software makes as to what that profile ought to be... RAW is not an 'absolute' format in terms of the image displayed, it's ...
Tetsujin's user avatar
  • 23.3k
13 votes

How can I convert an Apple iOS HEIF image into JPEG?

Support for reading HEIF was added to ImageMagick 7.0.7-22, you have to install it with --with-libheif flag. e.g. on macOS with Homebrew: ...
Jari Keinänen's user avatar
13 votes
Accepted

Are there reasons to NOT use Adobe RGB in JPEG/TIFF files and CIELAB in TIFF files?

sRGB is the STANDARD So stick with sRGB, it is the STANDARD for web content. I fail to see any reasons to not use Adobe RGB when it comes to JPEG files whatever you are posting them on web sites ...
Myndex's user avatar
  • 572
12 votes

Remove "quality" property from JPG

This isn't metadata that can be stripped. It's an analysis of the compression calculated from the quantization tables. When it's comes back unknown, the jpeg was compressed using a program that isn'...
StarGeek's user avatar
  • 3,803
11 votes
Accepted

Why are JPEG images from camera huge and the same images exported from Vistaprint software 10 times smaller?

Without going into a detailed explanation of JPEG, it is (in general) a lossy format: if you save a file as JPEG and then load it again, some of the pixels will have changed. However, unless you know ...
Peter Taylor's user avatar
  • 1,497
11 votes
Accepted

Should I convert my family pictures from JPEG to PNG?

There is no data loss from simply opening them, only by changing them & re-saving. Any data already lost can never be recovered. Simply converting now to a lossless format will not change the ...
Tetsujin's user avatar
  • 23.3k
11 votes

Two EXACTLY the same .jpg images with one image more than twice the file size of the other - Why?

If the files are different sizes, the only way the image data can be identical is if the Exif data is different (an embedded thumbnail difference would be a place to start). Suppose there are two ...
Bob Macaroni McStevens's user avatar
10 votes

Is it possible to find out what compression ratio was used for a particular JPEG?

You can, sort of. ImageMagicks' identify command can show a estiamte identify -verbose image.jpeg will produce (a lot of) ...
Rolazaro Azeveires's user avatar
10 votes

What is the "optimal" file size of JPEG images with respect to their dimensions?

Web developer here. Here's how I'd approach this: 1. Determine the displayed image dimensions and required screen resolutions. Your first task is determining what pixel sizes the images will be ...
nathancahill's user avatar
9 votes

Is a JPG guaranteed to produce the same pixels?

No, you can't depend on decoded JPEG images being bit-for-bit identical. As an example, I tried viewing the image at the top of this page in two different browsers: Chrome 53.0.2785.143 and Internet ...
Mark Ransom's user avatar
  • 1,495

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