Data reduction on JPG images

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
Hans_

Data reduction on JPG images

Post by Hans_ »

Hi,
I want to reduce the original data of a jpg-image (for ex. 700kbyte) to 40 kbyte but in the same format -> jpg (and not jp2 or jpc).
I tried with "multiple convert" but it only works with jpc or jp2.
Can XnView compress standard jpg-files from 700kb to a fixed size?
Thanks.
Guest

Re: data reduction on images

Post by Guest »

Hans wrote:Hi,
I want to reduce the original data of a jpg-image (for ex. 700kbyte) to 40 kbyte but in the same format -> jpg (and not jp2 or jpc).
I tried with "multiple convert" but it only works with jpc or jp2.
Can XnView compress standard jpg-files from 700kb to a fixed size?
You can change quality to save jpeg file options/Write/JPeg
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Xnview doesn't have a "compress to XX size" option for jpgs, but you can make the files smaller by increasing the ciompression (just use trial & error until you find the best balance of file size/image quality). 75~85% quality usually gives the best balance. If filesize is more important than quality, set the slider even lower (many images can go as low as 20% quality and still look ok). Alternatively, you can crop and/or resize the image first, that will cut down on the filesize by quite a bit.
Hans

data reduction on jpg-files

Post by Hans »

Hello,
thanks for your inputs, but the quality of the data compression on jpg-files is not good enough for me.
For example: I reduced first the image-size (file-size changed from 825.23KB to 346.12KB) and then I set the slider to 50% and the file-size goes from 346.12KB to 87.03KB which meets the same quality as 40KB compressed with "Corel-PHOTO-Paint 8".
Are there differences in the compression-algorithm between XnView and Corel-PHOTO-Paint or is it standard?
Does XnView need the double file-size to get the same quality or is a better compression-algorithm available / planned?
Why is a good quality possible with jpc- or jp2-formats? Is it possible to use this algorithm also on jpg -> or can I convert jpc-file to jpg (so that it can be handled with Internet Explorer)?
Thanks a lot!
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Different programs will get slightly different results regarding jpg quality, although I've never seen nor heard of that much of a difference. I suspect that corel is the oddball, and that it uses some special hyper compression method. If you compared several other programs, I suspect they would come closer to 87k than to 40k. You can also try checking the "optimize huffman table" option, and the "progressive" option (most people think that progressive only affects how the image downloads, but it affects filesize as well. On medium to small images, it will decrease the size somewhat. On large images, it will slightly increase the size. Try it and see what results you get.) You can also trim a few bytes (although probably not much) if you uncheck the options to keep exif and ictp data. Bear in mind though that this will cause any date, location, name, copyright, etc type data to be lost. There are some other tricks you can use to shave some of the filesize off your jpgs, depending on what you consider "acceptable" quality loss. For example, lowering the contrast of the image and using low level blur filters on the image will reduce the filesize without detracting too much from the image. (As I said though, it depends on what you consider acceptable quality loss.)

JPEG2000 (jp2 and jpc) is a different format with different compression methods. These cannot be used in the jpg format. You can convert jp2/jpc to jpg, but you will wind up with the jpg sized file, not the jp2/jpc sized one.
If you want to be able to view jp2/jpc files in internet explorer, grab a plugin. The one at morgan media is quite good and can handle both jp2 and jpc formats: http://www.morgan-multimedia.com/JPEG2000/

If you can, post the 87k jpg and the 40k jpg here, I'd like to look at them and see if I can figure anything out.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Found your problem, the image has a huge EXIF thumbnail.
Take the original image, resize to 795*596, save at 80%. Result= 100k file.
Take that same image, go into the save options and uncheck the keep ITC and keep EXIF options and again save at 80%, and you wind up with a 49k file.
Take that same image, go edit->metadata->remove EXIF thumnail and save at 80% (with the keep ITC/EXIF options checked) and you get a 50k image.
The freakin thumbnail is as large (at least filesize-wise) as the entire resized image.

Bottomline: To get the small filesize while still maintaining quality, remove that blasted thumbnail. The easiest way is to uncheck the keep itc/efix data options in the save options. If you want to keep the exif data other than the thumbnail, click on edit->metadata->remove exif thumbnail. This will remove the thumbnail yet still leave the rest of the exif data.
Post Reply