How to reduce image bit size

0

I have hundreds of images each with size of more than 250 kb. How can I reduce the size of these images without quality loss? Which optimizer works best?

prakasam

Posted 2010-06-21T07:17:17.857

Reputation: 27

Question was closed 2013-03-11T16:25:22.663

1Depends on what format they are in now, how big they are and how small you want them to be. – Nifle – 2010-06-21T07:27:55.743

i have jpeg format.image size are so big. i want to reduce size – prakasam – 2010-06-21T07:36:48.200

@Nifle: I think he means the filesize (KiB), not the the size of the image tiself (Pixel). – Bobby – 2010-06-21T07:37:58.543

ya absolutely. sorry for my mistakes – prakasam – 2010-06-21T07:40:49.210

Also, it seems that your previous question contained already an answer to this.

– Gnoupi – 2010-06-21T12:47:16.033

Answers

4

What matters the most for images is which format you save them as, and the compression algorithm they use. (Extra note, the way to do this is to open them in most image editors, and to save them again, choosing the format you want.)

If you want a lossless format, you can find the list on this Wikipedia page. I would personally recommend using PNG, quite effective and portable lossless format.

As a side note, JPEG is using a lossy compression already. Which means that you can reduce size by compressing more, by at the cost of quality. You can use JPEG with a quality factor of 100%, but then a PNG is more effective in size.

Gnoupi

Posted 2010-06-21T07:17:17.857

Reputation: 7 909

1Agreed. All image "optimizers" just reduce quality in one way or another. Some by reducing jpeg quality, some by ignoring small local wrinkles. – harrymc – 2010-06-21T10:28:19.617

2

Gnoupi is not quite right, there are image optimizers. Those are special programs that focus on losslessly reducing the size of images by using techniques such as bit depth reduction, color type and color modification.

Here are some examples:

If you're looking for a very simple tool, without the need to install anything, use the online tool Smush.it, provided by Yahoo.

In some cases you can get a 10% size reduction, every bit is important! :-)

Nicolas Bazire

Posted 2010-06-21T07:17:17.857

Reputation: 311

1Image optimizers still lose quality, by "wrinkling-out" small blemishes that hinder better optimization. – harrymc – 2010-06-21T10:25:48.593

Sorry, but how to do reduce bit depth, without losing quality? I can understand that if the image was using only 8 bits colors and was saved as a 32 bits, but it's rare. – Gnoupi – 2010-06-21T12:40:35.033

Besides, edited my answer about optimizers. – Gnoupi – 2010-06-21T12:47:51.197

1@Gnoupi: Some software (like Photoshop, even CS5) poor PNG implementations. For example, a screenshot of my file manager came out of PS at over 90 KB. The same screen saved from Paint.NET was about 77 KB. Letting OptiPNG optimize the compression of the IDAT chunks alone reduced the file size down to less than 60 KB. That's a 30% reduction in file size with zero quality reduction whatsoever. JPEG compression can also be losslessly optimized in some cases as well, though there's generally not as much gain to be had. – afrazier – 2010-06-21T13:38:39.787

Nicolas - I wasn't saying it doesn't work, but the particular example on bit depth is hard to believe, I was curious about how it is done. For the rest, I see indeed that you can optimize with these tools. Besides, about Smush.it, it seems that what they do is a combination of the tools you listed. @afrazier - thank you for more details. – Gnoupi – 2010-06-21T13:43:18.750

As far as I know, PNG (24) uses lossless compression. Like ZIP or other comression algorithms. But not bit depth reduction. There is PNG (8 bit), but a photo always would be reduced in quality if it is saved in 8 bit. – Martin – 2010-06-25T10:54:56.267

Sorry to contradict you but you seem to miss the point here. Most of the PNG images you'll see on the web are PNG8, because they're much lighter than PNG24 or PNG32. Lighter in size doesn't necessarily means lower in quality. – Nicolas Bazire – 2010-06-25T17:20:29.123

@Nicolas - If an image is made in 8 Bits to begin with, sure. What I meant is that you have no guarantee that a 24 bits image uses only 8 bits colors. If it does, you can indeed lower to PNG 8 and gain space. But if not, there will be a quality loss. – Gnoupi – 2010-07-05T13:05:38.467

1

Without either turning down the quality or the image size, I don't think you can hope for much less size. But anyways, I can recommend IrfanView as it has a nice batch processor feature which you can use to change the format and/or size of several images in one go.

Depending on what you need the images for, I would ask myself how big I really need them and how good quality they need to be in. Using JPEG you can also turn down the quality a bit without it really being that noticable. Unless you are a perfectionist and can't live with anything but the best quality. And if that is the case, that you only can live with best quality, I would use the lossless PNG-24 format and not worry about the file size.

If you install the IrfanVew plugin pack as well, you'll get a plugin called PNGOUT which you can try out to compress the PNG files a bit extra.

Svish

Posted 2010-06-21T07:17:17.857

Reputation: 27 731

1

one more thing to add, avoid using big size (pixels) images then resizing them in your html code.

for example : if you have a 320*320 image and you are going to show it as a 100*100 image, so resize it with any photo editor before you use it

mcha

Posted 2010-06-21T07:17:17.857

Reputation: 686

1

You asked about optimizing by reducing the color depth.

JPEG images are normally defined with 24-bits color depth, which means that every pixel in the image requires 3 bytes. One optimization you can do is reduce the color depth to 8 BPP, so that each pixel only takes one byte.

A JPEG can be only saved as 24 BPP (Bits Per Pixel) or 8 BPP grayscale image. JPEG does not allow any other BPP values. If you want other BPP values, you need to use some other format such as PNG. But be warned that the quality of the colors will be strongly degraded.

Some tools that you can use to batch-change the color depth are:

IrfanView
FastStone Photo Resizer (free for home users)

harrymc

Posted 2010-06-21T07:17:17.857

Reputation: 306 093

-1

You may want to use a software titled, XP Power Toys. You may download it from the following link:

XP Power Toys

There is a feature titled, Image Resizer.

Sobhi

Posted 2010-06-21T07:17:17.857

Reputation: 14

2Image resizer, however, is to actually change the dimensions. The need here is to reduce the bit size. – Gnoupi – 2010-06-21T09:00:19.190