Does this exist: JPEG compressors? [png file] [jpeg images]

Q: For PNGs, PNGs Crush, or PNGOUT a nice plugin for IrfanView has. It takes a , and runs a number of compression passes over it, resulting in drastic reductions somtimes file without quality loss.
Is something like this for ? Or JPEG format is like that thing can not be done? I do not mind setting my computer to work for a few hours to hell compressing images – simple balance of time vs. compression. PNGOUT is the same way – it can take several minutes on a 1024×768 screen, running a few passes over it. I was wondering if there was something for JPEG files. Freeware or open source is much better:).

And yes, I checked Google, to no avail. The JPEG “optimizers” I found seems to come down to “JPEG file savers,” apparently providing nothing more than another graphics program that can save JPEGs with an adjustable quality slider. IrfanView is doing that already. I want something similar to LAMEs image. The bitrate stays the same, but the quality will affect the time spent LAME compress the data – how thorough a job it does.


Re:I'm afraid not – it looks like it merely changes the dimensions. IrfanView can do that too, in batch, and it's free.

In relation to the filesize vs quality vs compression ratio issue, I guess such a utility just doesn't exist. I'd prefer separate sliders for quality and compression ratio. Such a thing is possible – WinRAR. Set the compression ratio from Fastest to Best. "Quality" is constant, but compression can be improved.

As you said, JPEG seems to be meant just for quick-and-dirty compression.


Re:guy,

Okay, found this. It might be what you want.
http://www.jklnsoft.com/


Re:I guess my point is that there's a standard for mp3 bit rate. So, you can encode to a specific bit rate. On the other hand, JPG doesn't have that standard because the original image could be an optimized JPG already, thus when you lower the quality again, it degrades greatly. Sure, you can say let's compress the JPG 50% in PS, but if the file is already compressed 50% to begin with, you will loose more than 50% of the original JPG. Unlike MP3, you know what the bit rate is when you open the song, thus you can choose to lower it further, while you can't see that info in JPG. So, compression for JPG is very subjective. Some sipler JPG w/ less gradiation and color shifts can compress better than nice smooth color shift.

Also, JPG was never meant to be a printed format, so the quality wasn't meant to be great. So, if you just want to shrink the size for web usage, you probably have to go to each photo and set the compression one by one manally. Unfortunetly, to my knowledge, there isn't a software to do that.


Re:Originally posted by: guy

Originally posted by: guy

Load it into IrfanView, and save it with PNGOut. It's still saving the file to the same format

load what into IV ? the original BMP or the jpeg ?

"Load it" referred to the compressed created by Paintbrush.


Re:Originally posted by: guy

Load it into IrfanView, and save it with PNGOut. It's still saving the file to the same format

load what into IV ? the original BMP or the jpeg ?


Re:I can take an a fresh 2mb jpg picture from my camera, open it in MSPaint, save as a different name.jpg, & the file size will shrink close to half that while retaining the dimensions. Probably loses quality up close, but for uploading to websites, that's what I do.

Re:PNG is lossless, generally. It does support different bit depths, but I use it in lossless mode.

PNG and Xvid use algorithms which are capable of generating nice quality from already-compressed data, making multipass encoding feasable. JPEG probably generates the best quality by starting with the pure data, so multipass doesn't give any advantages.

I guess I was just after a JPEG "optimizer" then – something that would analyze the already-compressed image, and find anything redundant. I think that's part of what PNGOut does – find data that's redundant, and get rid of anything extra.


Re:Originally posted by: guy
Have a file here that's 968,538 bytes as a bitmap. Picture file, so it's fairly complex data.
Save it in Paintbrush. It takes a quarter of a second to do, and it does a fair job of compressing it. 573,400 bytes.

Now, take that same compressed file and compress it again. Won't do anything right? Based on your post, it wouldn't make any difference to compress it further, as it's already compressed.

Load it into IrfanView, and save it with PNGOut. It's still saving the file to the same format, but now it's spending time on the problem. 21.028 seconds to be exact. Pbrush spent about a quarter of a second, and it gave about a 40.8% reduction in filesize.
PNGOut made 10 passes on the file in those 21.028 seconds. Final filesize: 386,414 bytes
I didn't change the file format. I didn't change the quality. All I really changed was the amount of time put into compressing the file, and that resulted in a smaller filesize in the end.

Yea, but you used a different algorithm for the second encoding. I reckon you would get better quality by going straight to PNG from the original.

Yes, PNG is lossless. But as I've mentioned, XviD, a lossy compression method, just like JPEG, has options that let you sacrifice encoding time while maintaining good quality and filesize.

PNG and Xvid use algorithms which are capable of generating nice quality from already-compressed data, making multipass encoding feasable. JPEG probably generates the best quality by starting with the pure data, so multipass doesn't give any advantages.


Re:Originally posted by: guy
like the others said…doesnt make sense.

If you want t ofurther compress JPEGs (for online/bandwidth reasons etc.) just load 'em in paintshop/photoshop etc. and reduce quality.

JPEgs are already compressed (quality trade-off)….compare their size to the corresponding TIFF/BMP.

That's what I don't get though – why doesn't it make sense? I'm just feeling like there's not complete understanding here of what I'm saying.

24-bit bitmap. 3 bytes per pixel. Have a file here that's 968,538 bytes as a bitmap. Picture file, so it's fairly complex data.
Save it in Paintbrush. It takes a quarter of a second to do, and it does a fair job of compressing it. 573,400 bytes.

Now, take that same compressed file and compress it again. Won't do anything right? Based on your post, it wouldn't make any difference to compress it further, as it's already compressed.

Load it (the PNG created by Paintbrush) into IrfanView, and save it with PNGOut. It's still saving the file to the same format, but now it's spending time on the problem. 21.028 seconds to be exact. Pbrush spent about a quarter of a second, and it gave about a 40.8% reduction in filesize.
PNGOut made 10 passes on the file in those 21.028 seconds. Final filesize: 386,414 bytes
I didn't change the file format. I didn't change the quality. All I really changed was the amount of time put into compressing the file, and that resulted in a smaller filesize in the end.
Yes, PNG is lossless. But as I've mentioned, XviD, a lossy compression method, just like JPEG, has options that let you sacrifice encoding time while maintaining good quality and filesize.


Re:like the others said…doesnt make sense.

If you want t ofurther compress JPEGs (for online/bandwidth reasons etc.) just load 'em in paintshop/photoshop etc. and reduce quality.

JPEgs are already compressed (quality trade-off)….compare their size to the corresponding TIFF/BMP.


Re:Originally posted by: guy

You could save as a high quality file then open the file again and re-save as a low quality (thereby using two passes) but the final quality would be worse than using the lower setting to start with.

Yeah, because for instance, with XviD, the first pass is an analysis of the complexity of the video, and it writes that information to a .pass file. When it does the second pass, it uses that information to accurately distribute the dataspace to where it's needed.
Another example – say you have a picture that's 100×100 pixels, all red. A quick save (low quality mode) option might divvy up that space into little blocks, and say "10×10 block: red. Next block! 10×10 block: red" and continue like that, until you have a large file with a whole bunch of redundant data. Whereas, if it was set to take its time (high quality mode), it'd realize "hey, this whole darn thing is the same color." And the file reads "100×100 block: red." There you go. Same quality, much smaller file – all because it took more time to think about it.


Re:Photoshop has quality settings for jpegs under the 'save for web' menu and will also estimate the file size for you as you adjust it. Gimp (free) likely has similar features but I haven't checked. Also, make sure you are saving gifs when you have line art or images with only a few colors, but jpegs when you have many colors and few defined edges.

/edit: Oh, you said you _don't_ want a quality slider… you want the program to spend more time to get a better result? I don't think this will work on jpegs. You could save as a high quality file then open the file again and re-save as a low quality (thereby using two passes) but the final quality would be worse than using the lower setting to start with.


Re:Originally posted by: guy
seems like a huge waste of time and effort in the days of 300gb hard drives.

I'm not talking about saving hard drive space though, I have plenty of that. I'm talking bandwidth. 1000 people load a webpage with 20 x 15KB images, that's about 300MB. Cut those images down to 9KB each, and it's 180MB, for a savings of 120MB of bandwidth.

Originally posted by: guy
JPEG in itself is already a compressed format, like MP3. It's almost pointless to further degrade its size and quality. Therefore, I don't think there will be any software that will do what you want. Also, it's just a bad idea to further compress a compressed-file to start with. When you compress jpeg in Adobe PS, you get to see how bad the artifacts will be in different situation and you can choose the % compression. So, there's not a standard way to compress the file due to the use of color in the image; unlike mp3 which has vbr option.

But see, LAME MP3 offers the quality option, q=0 through q=9. The difference is, q=0 tells the encoder to spend a lot more time compressing the same data. The bitrate remains constant, but the quality is vastly improved. The downside is the amount of time spent. Encoding a song at q=0 might take 5 minutes, while at q=9, you'll get lousy results, but you'll get them in under a minute.
XviD has similar options – you tell it "I want a file of X size. Make it happen." So it runs one pass over the video to analyze it, then it does what it can to squish the data stream into the filespace it was given. And there are quality settings – motion search, VHQ mode, chroma detection, etc – that all just determine how much time the encoder will take to do its job. More time spent = better quality. So it's not just a simple size-vs-quality equation. Time spent compressing is also a factor.

I just wondered if there was something like that with JPEG – "I want this file to be as close to 10KB as possible. You have 2 minutes to work on it." The first sentence there is equivalent to telling XviD how big of a file you want, and the second sentence is analagous to LAME's quality setting.
They offer it with PNG, which is also a compressed format. It's all about time spent though. Windows' Paintbrush saves in PNG, but not with very good compression. PNGOut will take that already-compressed PNG, analyze it thoroughly, and produce a much smaller file with no quality degredation.


Re:JPEG in itself is already a compressed format, like MP3. It's almost pointless to further degrade its size and quality. Therefore, I don't think there will be any software that will do what you want. Also, it's just a bad idea to further compress a compressed-file to start with. When you compress jpeg in Adobe PS, you get to see how bad the artifacts will be in different situation and you can choose the % compression. So, there's not a standard way to compress the file due to the use of color in the image; unlike mp3 which has vbr option.

Like guy mention, in the days of cheaper media, there's almost no point in doing so.


Re:seems like a huge waste of time and effort in the days of 300gb hard drives.

Related posts

Leave a comment

0 Comments.

Leave a Reply


click to changeSecurity Code

[ Ctrl + Enter ]