Showing posts with label image-compression. Show all posts
Showing posts with label image-compression. Show all posts

Wednesday, March 7, 2012

What feature or technical info to look for in a smartphone camera for good compression?

Question

from What is the difference between image size and image quality?

http://en.wikipedia.org/wiki/Image_compression

Answer

I wouldn't worry about compression in smartphones. I'm not familiar with any popular smartphone that actually takes photos in the RAW format, so the rest of them actually shoot in standard JPG. Apparently some smartphones do have a RAW format, but this isn't very standard.

JPEG/JPG is a lossy format, but it is the most common image format of today, and widely used. Other formats do exist such as JPEG 2000, but because they are not supported by modern web browsers, they are not popular or used widely.

What I would recommend looking for is the image sensor size, aperture, and ISO capabilities of the camera.

Answered by dpollitt

Friday, February 10, 2012

What are compressed image formats with high quality/size ratio?

Question

I'm looking for an image format, unpopular as it may be, that has good quality and also good compression. After I'm done post-processing my RAWs I want to export them in a way that's shareable and practical, trying to save as much space as possible. PNG seems too heavy and JPG is quite lossy.

Asked by the.midget

Answer

It depends on what you mean by "shareable" and "practical". Are you sending your images to the web, a printer, or just your own storage solution? The only practical format for the web is JPEG. If you are sending to a printer you can probably chose between TIFF, JPEG, and PSD. If you are just storing it yourself, you could use PSD, PNG, TIFF, JPEG, DNG, or your native RAW format.

Practically speaking, JPEG is great quality and sharable so there is not a real need for anything beyond that at this time. See my previous post on JPEG 2000.

Answered by dpollitt

Friday, February 3, 2012

Why don't cameras support JPEG 2000 format?

Question

The original JPEG format was updated in 2000 to provide a variety of features including less artifacts, better compression and lossless compression. Why haven't cameras updated to use this new format?

Answer

JPEG 2000 has not garnered wide acceptance due to a few factors.

  • Lacking backwards compatibility to JPEG
  • Lack of wide browser support
  • Questionable legal status
  • (Only) 20% higher performance, while considering how inexpensive storage is
  • Additional processing power/time needed to create
  • JPEG already considered quite good
  • Amount of rework to the code in cameras and desktop software is high

Friday, January 27, 2012

Are “Windows Photo Viewer” rotations lossless?

Question

Can I rotate lossily compressed photos that I view in Windows Photo Viewer without worrying about losing even more information to compression?

Answer

If the dimensions of the image are multiples of 8 (or 16 if chroma subsampling is used) then the rotations are lossless. Otherwise it is not possible to rotate the image without recomputing the blocks i.e. recompressing the image, which is lossy.

The reason for this is that jpeg images are broken up into a series of 8x8 or 16x16 blocks which are compressed individually. Incomplete blocks are only allowed on the right edge and bottom edge. Thus is your image is not an exact multiple of 8/16 it will contain incomplete blocks, which will end up on the wrong edge after rotation.

I verified the above assertion using the version of Windows Photo Viewer that ships with Windows 7. I used two images of colour noise. One image was 256x256 i.e. both sizes multiples of 8. The other image was the same but cropped to 253x253 i.e. neither size was a multiple of 8. Here are the images:

256x256

253x253

I then performed four anti-clockwise rotations, closing photo viewer after each rotation to ensure the image was saved in it's rotated state.

256x256

253x253

There's no need to perform a subtraction to see the difference with the 253 pixel image, it's noticeably darker and muddier!

A diff on the other image looks like this:

i.e. the images are identical, the rotations were lossless.

Monday, January 16, 2012

How to avoid jpeg compression artefacts when saving photos in web resolution?

Question

When I save a web-resolution image (for example, 1920×1024px), flat areas tints often have damaged shades of color. I'm saving in Photoshop CS4 with quality 2 in standard mode, because I need the files to be less than 300k. How can I make my JPEG images this small without the compression artefacts?

An example: http://www.screencast.com/users/capsize/folders/Jing/media/f858e229-1f05-431c-98ce-5334918aa1f3

Answer

If you save a JPEG image with an extremely low quality level, you WILL get compression artifacts. Its just a simple fact of JPEG lossy compression. If you wish to avoid compression artifacts, use a higher quality setting than 2. You won't need to save at maximum quality, as most images can be saved with a fairly low quality setting without noticeable loss in detail or visible artifacts.

One thing to note is that smooth gradients and JPEG do not mix well. JPEG compresses small blocks of the image, and when it comes to smooth gradients, it tends to make all the pixels in a block the same or very similar colors. This creates distinct banding (posterization) that can be quite visible. The only way around this is to use a higher quality setting, however that will obviously increase your file size.

An excellent article that might be of help can be found here:

The above is for Lightroom, however the fundamental concept still applies to Photoshop. The important point from the article above is that the lower range of quality settings for JPEG tend to have a minor effect on image size, and it is only when you get to the upper few brackets that image size starts to climb by any significant degree. I would suspect that you could change your quality setting from 2 to 5 and only incur a small hit to your image size.