Hot answers tagged

58 votes

Does simply opening and closing a JPEG file decrease image quality?

This is based on a misunderstanding. Loss of quality happens only during the compression that is done when an image is saved as JPEG. But it doesn't matter whether it was edited or not. So: you will (...
user avatar
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 ...
user avatar
37 votes
Accepted

How can I add a border to a JPEG photo without affecting quality?

Although Philip's answer is the best way to go, it is possible to do what you want entirely within the sphere of JPEG. JPEG works by breaking your image up into blocks called Minimum Coding Units (...
user avatar
  • 5,154
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. ...
user avatar
  • 3,602
35 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 ...
user avatar
  • 26.3k
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 ...
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 if the image uses the standard ...
user avatar
  • 4,845
32 votes
Accepted

Why use JPEG instead of RAW?

Beyond the very obvious memory card requirement differences between RAW and JPEG images as noted in the question: JPEGs are compressed and typically have much smaller file sizes. For example a RAW ...
user avatar
  • 45.7k
30 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. ...
user avatar
  • 26.3k
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 ...
user avatar
  • 1,749
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 > ...
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 ...
user avatar
  • 16.5k
23 votes

Does simply opening and closing a JPEG file decrease image quality?

Absolutely not. You need to edit the file and re-save it as a JPEG in order to compound the effects of image compression. Just viewing it has no effect at all — if it did, all of the JPEGs on the web ...
user avatar
  • 1,262
21 votes

How can I add a border to a JPEG photo without affecting quality?

The point to remember here is that you lose quality when saving the photo into a lossy compression format. So long as you save the photo in a lossless format (PSD, TIFF, etc) after adding the border, ...
user avatar
  • 19.8k
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 ...
user avatar
  • 140k
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 ...
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 ...
user avatar
  • 31k
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 ...
user avatar
  • 26.3k
18 votes
Accepted

Is there a lossy compressed file format for 16-bit dynamic range images?

It sounds like what you're looking for is JPEG2000. It has a range of options including a 16-bit lossy compression and better compression ratios than JPEG. It hasn't been as widely adopted as hoped (...
user avatar
  • 9,440
18 votes

Can I do "back conversion" of a B&W JPEG to color?

If this image were RAW, the color would still be there. But since it is JPEG, I'm afraid not. The fact that the image is in RGB format does not help, because I'd you look, you will find that in fact ...
user avatar
  • 140k
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, ...
user avatar
  • 20.7k
17 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 ...
user avatar
  • 20.7k
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 ...
user avatar
16 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 ...
user avatar
  • 2,809
14 votes
Accepted

How to save JPEGs from GIMP 2.8 and higher?

Use the "Export..." option on the File menu. .xcf is GIMP's native format, similar to how Photoshop uses .psd files, and stores all the information (layers and the like) GIMP needs to edit files in ...
user avatar
  • 19.8k
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 ...
user avatar
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: brew install imagemagick --with-libheif. If you have ...
user avatar
13 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 ...
user avatar
  • 19.7k
12 votes
Accepted

How can I detect upscaled photos?

Have a DOG sniff out blur in the photos. If you're going to be penalizing for digitally enlarged photos, you might as well penalize for out-of-focus photos too. The blurred edges and details in both ...
user avatar

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