New Mozilla Encoder Improves JPEG Compression
jlp2097 writes "As reported by Heise, Mozilla has introduced a new JPEG encoder (German [Google-translated to English]) called mozjpeg. Mozjpeg promises to be a 'production-quality JPEG encoder that improves compression while maintaining compatibility with the vast majority of deployed decoders.' The Mozilla Research blog states that Mozjpeg is based on libjpeg-turbo with functionality added from jpgcrush. They claim an average of 2-6% of additional compression for files encoded with libjpeg and 10% additional compression for a sample of 1500 jpegs from Wikipedia — while maintaining the same image quality."
It's not lossy. I try to always use PNG.
Now if Firefox could just scale images properly when viewing them.....
Competition Good, Monopoly Bad.
Seems like a negligible improvement. I mean really. With hard drive space plentiful, and bandwidth faster than most users can use at any given moment, saving 20-60Kb on a 1Mb file is like a fart in the wind, even for mobile users.
I'm with the AC in the first post, I use PNG for 90% of my images, since it supports transparency. The file may be slightly bigger, but who cares.
Because it is bigger?
PNG 8 to replace GIFs
PNG 24 to replace JPEGs
Dave Barnes 9 breweries within walking distance of my house
In the dialup days you could use your ISPs web proxy that would super compress images using some proprietary version of JPEG (M-JPEG?) so that you'd get adequate quality and maybe 20x the compression.
These days people have 25mbit, 50mbit, 150mbit Internet connections so I wondered if it really matters? Then I realized yes it does because many websites stopped caring about how many MEGABYTES of stuff you have to download just to look at one page. Our local TV news had a store on it last year. There is an effort to help a large rural area to get high speed Internet, and they were showing how slow it is to load a single page on modern websites using dialup. Some pages could take 4 - 5 minutes to display. I remember how slow dialup used to be, and it wasn't that bad before. People put large images without caring about compression on their pages these days.
What's the cost in time and/or CPU cycles for the 2-6% gain in compression?
Where in the article are you getting anything about patents? The innovation here is to try multiple orders of sending the DCT coefficients ("figuring out which progressive coding configuration uses the fewest bits").
My digital camera has horrible compression. I can load and save the pictures with pretty much any application, and the size of the files is reduced significantly without any noticeable image quality reduction. (And yes, I am saving it in the original size.) Maybe it's just my old Sony camera, but it's likely a common issue--I expect embedded compression in consumer devices worries more about simple and fast than best quality for the file size.
Not only rural areas. Tablets nowadays have more pixels than HDTV, yet cellular plans still have a single digit GB per month cap.
is what I get from "compatible with the vast majority of decoders".
Sounds like it breaks something.
Your source images should always be lossless and very high resolution. For geometric images, you should be using font glyphs for monochrome and SVG for multi-color or filtered content. For animated geometric images, you use SVG+SMIL. For a fallback (stupid Microsoft), you use animated GIF or JavaScript with SVG or canvas. For continuous tone images and some limited cases, you use WebP. For a fallback, you use JPEG for continuous-tone images, i.e,, photographs, and PNG for geometric images. Except for extremely simple and tiny images—less than 500 bytes—in which case GIF wins for size.
Seems like a lot of work, right? Why go through the trouble? Because SVG and font glyphs are commonly 90% smaller than PNG for geometric images. WebP is 10-20% smaller than JPEG. Images (and videos) take up most bandwidth on a site. The bigger the site, the bigger the difference in your bandwidth bill proportionally.
Oh yeah, and optimize those PNGs! pngquant to reduce your color palette when possible. PNGOUT for indexed images. Pngcrush for PNG24 and PNG32. And advpng to re-DEFLATE the output. Or use a program that bundle these tools.
No other browser maker except Microsoft supports it, and no others even plan to. It doesn't compress better than WebP. Unlike WebP it doesn't have a lossless or paletted/indexed variant. So what is JPEG2000 even for? An alpha channel? With masking and other filter effects arriving in CSS, you can effectively add a selective alpha channel after the fact. Or just use WebP.
Firefox will be supporting WebP as soon as they consider it stable enough. Opera already supports it by moving to Blink. Chrome for Android supports it and consequently so does Android 4.4. If Safari gets it, kiss JPEG2000 goodbye forever. Microsoft simply doesn't control the space enough anymore to dictate features.
Yesterday
The resistance to support WebP in Mozilla seems to be more politically motivated than technical.
ayottesoftware.com
The resistance to support WebP in Mozilla seems to be more politically motivated than technical.
Why not add JPEG-XR as well?
https://en.wikipedia.org/wiki/JPEG_XR
Yeah, lots of universities use it for a lot of things, like scientific and cultural heritage images... they serve the images up, if need be, through the proprietary lurawave image server... not a great solution from a systems perspective, but it's what they like.
Personally, I think the lack of widespread adoption makes it a serious preservation concern.
Maybe this would be good for use with MJPEG for video editing.
Agreed, it's a much better choice. I actually converted my entire image library to .webp, and I use Irfanview to view the images. The filesize savings were huge, with no visible reduction in quality.
Some examples:
4.5 MB JPG -> 109 KB webp
3.66 MB JPG -> 272 KB webp
3.36 MB JPG -> 371 KB webp
One folder of mixed JPGs and PNGs with a total of 169 MBs was converted to webp. the total size of all contents of the folder ("directory", whatever you want to call it) was 6.44 MBs. I was so impressed that I kept records of the results.
Not only would this be HUGE for sites like Wikipedia, but it also significantly decreased the amount of space that I was using in my cloud storage account.
Honestly for all of their PR about a better, more open web, all we really get is the same old politics and attempts at controlling what is and is not the standards. They still behave like children. Mozilla, Google, I'm not taking sides. They're both at fault.
I would rather see JPEG 2000 support.
One word: mobile.
The experience for mobile users is often similar to using old-school dialup.
Responsive web design only partially solves the issue.
i thought it was a full program with menus and icons and stuff. didn't realize that it was only available in source code. guess i'll need to wait for someone to make it into a Windows 7 program or a plugin for Gimp.
0) JPEG is past, present, and near future. Well supported everywhere.
1) JPEG optimization could be better. Mozilla is doing more of that.
2) Patents on enhancements to JPEG from minor obvious ones to significant compatibility breakers prohibit improvements. JPEG's final compression step was poor from the beginning and the better stuff was patented and unused. At least a decade ago StuffIt used modern binary compression to replace the final phase, which was exempt from existing patents; however, StuffIt patented this idea... it increased compression by 20-30% with no loss.
3) JPEG 2000 used a more modern encoding process probably similar to VP8 as far as the quantization and color space handling. Nobody uses JPEG2000 even though the smarter encoding makes compression artifacts less noticeable. The file size was not much smaller for all that extra RAM and CPU it took over JPEG - plus incompatibility. probably patents involved with it's demise as well.
4) Yet another JPEG replacement by a big corp... When everybody has MORE bandwidth, faster computers, and unimaginably more storage space on their smart phones than their desktops had in the late 90s. Why limit yourself with an obscure format to gain 30% more space when the storage you buy on sale at the end of this year will easily be 30% bigger than last year.
How much more CPU / watts will WebP cost you over JPEG?
I don't care how good it is; it has to be patent free, widespread, and proven.
Democracy Now! - uncensored, anti-establishment news
I thought the world moved on from JPEG a long time ago.
Either you are trolling or you operate in some strange niche that is isolated from the rest of the world
Back in the real world jpeg is by far the dominant format for lossy compression of photographic images. The wide compatiblity of jpeg has outweighed the advantages of more modern formats.
Still patented?
There have been a number of patent claims against baseline jpeg over the years but afaict none of them have really stuck.
There was also previously a patent on the optional arithmetic coding feature but that has since expired.
note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
Many locations don't have any other option then dial up
Are they all on a north face of a mountain? Because if there's a tall building in the way, the area is probably urban enough to get DSL or DOCSIS, and if there isn't a mountain in the way, it can more than likely get satellite.
Regarding data compression, it's worth to mention that there is a new approach to entropy coding (ANS) - while Huffman is fast but inaccurate, arithmetic coding is accurate but slow, this one is both fast and accurate.
Some implementation and sources: https://github.com/Cyan4973/FiniteStateEntropy
JPEG is the MP3 of images. Goo enough and so ubiquitous that nobody even tries to compete anymore.
Write boring code, not shiny code!