Extension

Archived
Forum
(read-only)

CE Lossless

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Causing Effect

     

Confused, does this increase JPEG quality?

General (Resolved)

BA Creative
BA Creative

Will this dramatically improve quality for JPEG’s?

I have noticed some fairly so-so quality on CE Image standard, especially with JPEG’s downsized from the originals quite a lot. I’m hoping this would improve quality.

P.S: I’m a bit confused why this isn’t just an update to CE Image, as this would simplify developers already complex lives. Having to purchase this separately isn’t ideal IMHO. I’m willing to pay for quality work, but would much rather this was bundled into CE Image with a slightly higher price.

Causing Effect - Aaron Waldon
# 1
Developer
Causing Effect - Aaron Waldon

Hi BA Creative!

Will this dramatically improve quality for JPEG’s?

No. It does not improve image quality. It losslessly compresses the images. You can Google “Lossless Compression” for more information on what that means. I also explain it on the CE Lossless homepage. ;)

Essentially, it makes your images extremely optimized (lower file sizes) without sacrificing visual quality. This is by all means an add-on. CE Image already compresses images as much as it can using the tools that are available from the GD library. In the latest update to CE Image (released last night), I leverage relatively newer PHP capabilities to compress png images even more than before, as that functionality is now available for those who are on PHP 5.1.2+.

I have noticed some fairly so-so quality on CE Image standard, especially with JPEG’s downsized from the originals quite a lot. I’m hoping this would improve quality.

The quality is bad in what way?
If you lower the quality= parameter for JPEG images below 100%, they will be lower quality. That is because JPEG is a lossy compression format. PNG and GIF quality are lossless formats, so they tend to maintain excellent quality, even when working with the GD library.

If the images are blurry when downsized, you can use the sharpen= and/or the auto_sharpen= filters. If the color seems whack for JPEGs, that can sometimes happen with the GD library. The best way to avoid that is to save your images as sRBG. The reason that is an issue, is because the GD library strips out any color profiles.

P.S: I’m a bit confused why this isn’t just an update to CE Image, as this would simplify developers already complex lives. Having to purchase this separately isn’t ideal IMHO. I’m willing to pay for quality work, but would much rather this was bundled into CE Image with a slightly higher price.

I certainly am not trying to make anyone’s life complex. The documentation explains why CE Lossless is not bundled with CE Image, so please refer to that. I’m happy to answer your questions if you have any after reading that.

Ultimately, CE Image does all that it can with the GD library. CE Lossless utilizes other applications to take this to the next level. CE Image has in no way sustained a loss by the addition of CE Lossless. They are independent. CE Image has been constantly updated since I released a little over a year and a half ago, and it is continuously improving.

I personally am a huge fan of lossless image compression. The fact that I can reduce overall image sizes on my site from between 10-50% is awesome to me. I am also an avid Google Page Speed tester, and image compression is taken into account for that score. CE Lossless automates that process for me.

This add-on took me time to build and test. I actually wrote it, and then rewrote it before its release in order to make it more flexible. It is very easy to install, and can be run on Linux, OS X, and Windows. I personally think it is well worth the piddly $10 a license for those that want it and have the ability to install it. If someone does not think it is worth it, I wouldn’t expect them to buy it.

BA Creative
# 2
BA Creative

I probably should have explained myself some more. I do actually understand lossless vs lossy compression, thanks for clarifying anyway, but my confusion was due to the mention of ‘lossless’ compression mentioned alongside JPEG (as shown in the graphic) which of course we all know is a lossy codec. So I wanted to double check if you had meant something else, but it’s all clear now.

I will have to try the ‘sharpen’ method, as I’ve definitely had blurry results from the GD resize.

I love your add-ons, and purchase them frequently, so wanted to say thanks for the hard work. From the Devot:ee page it feels a little unclear exactly what CE Lossless is. My suggestion would be to slightly change the opening intro:

“CE Lossless is an extension to the CE Image add-on for ExpressionEngine, utilising lossless minification techniques that help reduce image filesize beyond regular compression.”

Something like that maybe, because the mention of ‘minification’ to me is a flag for these kinds of specialist image tools.

Causing Effect - Aaron Waldon
# 3
Developer
Causing Effect - Aaron Waldon

my confusion was due to the mention of ‘lossless’ compression mentioned alongside JPEG (as shown in the graphic) which of course we all know is a lossy codec.

CE Lossless does losslessly compress JPEGs. ;) Changing the image quality= in CE Image (or another image resizing add-on) is a lossy operation, which will result in image degradation and a smaller file size. However, when images are run through CE Lossless, their quality is not changed. They can be run through lossless compression (via jpegoptim or jpegtran) and still result in a decreased file size, but not at the expense of quality. You can both change the quality of a JPEG (lossy), and losslessly compress/optimize it. You can also losslessly compress a JPEG image at 100% quality for a savings in file size, and it will still be at a quality of 100% afterwards. It will not be the same as the original, but its visual appearance will be virtually identical. Do you understand?

I love your add-ons, and purchase them frequently, so wanted to say thanks for the hard work.

Thank you. :) I appreciate your support. I think EE has one of the best communities around!

the mention of ‘minification’ to me is a flag for these kinds of specialist image tools.

I get where you are coming from BA Creative, but CE Lossless is not a minification tool. That would be a misnomer. Minification is a word that is generally used to refer to the process of removing unnecessary whitespace and characters from programming code like JavaScript and CSS, and is quite different in that it does not entail any form of compression. CE Lossless is literally a tool for lossless image compression. ;)

BA Creative
# 4
BA Creative

Fair enough, it’s a matter of preference with the way I associate what the meaning of compression vs minification vs optimisation. This may be splitting semantic hairs too much, I associate tools which strip out EXIF, headers and other fragments as minification/optimisation:

“Minification can be distinguished from the more general concept of data compression in that the minified source can be interpreted immediately without the need for an uncompression step: the same interpreter can work with both the original as well as with the minified source.” — http://en.wikipedia.org/wiki/Minification_(programming)

This is because they strip out unnecessary ‘stuff’, but don’t actually change the decompression algorithm. So AFAIK, and I’m by no means thoroughly-informed, tools like PNG Crush don’t alter the compression algorithm required, they simply ‘optimise’ the data by removing or reorganising it more efficiently.

To me it isn’t ‘compression’ and you are right it isn’t akin to what we usually refer to as ‘minification’, so perhaps the best word IMO is ‘optimisation’.

It doesn’t really matter in the end, but I just find it an interesting overlap of terms and was trying to make the most sense of it for my own purposes. :)

Causing Effect - Aaron Waldon
# 5
Developer
Causing Effect - Aaron Waldon

Your quote actually nails it:

can be interpreted immediately without the need for an uncompression step

JPEG, PNG, and GIF are compression formats. The data has to be uncompressed, then the various optimization (which can include optionally stripping out metadata, comments, etc) and compression algorithms are run. You can losslessly compress an image with some of the programs without stripping out any of the EXIF info or other metadata.

JavaScript and CSS, however, do not require an uncompression step. Minification does not entail compression.

If you would like to replace the word “compression” with “minification” in your head, no worries. I suppose that’s close enough. But again, the entire point of the add-on is to losslessly compress the images. I didn’t name it “CE Lossless” instead of “CE Image Minifcation” to be clever; that’s actually what it does! ;) The word “optimization” is fine too. I suppose I could rename the add-on to CE Image Optimization, but I don’t want to. And that is my prerogative. :)