Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Lossy operations are not currently supported #180

Closed
binarykitchen opened this issue Mar 27, 2014 · 31 comments
Closed

Error: Lossy operations are not currently supported #180

binarykitchen opened this issue Mar 27, 2014 · 31 comments

Comments

@binarykitchen
Copy link

@binarykitchen binarykitchen commented Mar 27, 2014

Yesterday that error wasn't here. But today. What does this mean?

Running "imagemin:png" (imagemin) task
Warning: ** Error: Lossy operations are not currently supported
 Use --force to continue.
@kevva
Copy link
Member

@kevva kevva commented Mar 28, 2014

I've no idea. It's an error outputted from optipng.

@jamesplease
Copy link
Member

@jamesplease jamesplease commented Mar 28, 2014

@binarykitchen their issue tracker is here.

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 29, 2014

Ok I will ask there. But I think since this module relies heavily on optipng, it concerns everyone of us here.

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 29, 2014

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 29, 2014

@vladikoff I've seen it too but it doesn't tell me much. No hint on how to solve it, what the cause it etc.

Look, I did not touch my PNG files nor program code this week and then suddenly this happened. All I did is an npm update over many packages. Weird.

@vladikoff
Copy link
Member

@vladikoff vladikoff commented Mar 29, 2014

@binarykitchen clear the old PNGs, try optimizing with the new version of the plugin, 0.6.0 ?

@ctruta
Copy link

@ctruta ctruta commented Mar 29, 2014

The resolution to this error is using an OptiPNG version that supports the option "-strip=all". The earliest version that supports this option is 0.7 (although using that old version is not recommended, because of other defects). The recommended stable versions are either 0.7.4 or 0.7.5.

Thank you very much for using OptiPNG :-)

@ctruta
Copy link

@ctruta ctruta commented Mar 29, 2014

@vladikoff The "lossy operations not supported" error message exists in the 0.6.x line only. It was removed from version 0.7, when the option -strip got implemented. I guess you might pick up an older OptiPNG version accidentally from somewhere else in your $PATH?

@kevva
Copy link
Member

@kevva kevva commented Mar 30, 2014

Do you have OptiPNG installed globally?

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 30, 2014

Thanks guys for your comments. Hmmm, with the new version 0.6.0 I get a new error:

Fatal error: Cannot find module 'pngquant-bin'
@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 30, 2014

Also, I found in another grunt task for JPG files only that any JPG file becomes corrupted :(

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 30, 2014

@kevva No, I do not have OptiPNG installed globally

@kevva
Copy link
Member

@kevva kevva commented Mar 31, 2014

@binarykitchen, that's weird because the version we provide is 0.7.4

asd

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 31, 2014

Windoze? I am on Linux. Has anyone tested the latest package on Linux yet?

@kevva
Copy link
Member

@kevva kevva commented Mar 31, 2014

Oh, was under the impression you was on Windows. Just ran it on Linux (Ubuntu) and everything worked smoothly. Also Travis is Linux too and tests are passing fine there.

Try npm cache clean and install again.

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 31, 2014

Hah, I made that impression? Lol ...

Ok, I'll try to clean the npm cache tomorrow at work. Ta!

@kevva
Copy link
Member

@kevva kevva commented Mar 31, 2014

Nah, not you. But most problems seems to come from Windows users so I just assumed you were one of them ;pp.

@ctruta
Copy link

@ctruta ctruta commented Mar 31, 2014

@binarykitchen just a guess: are you, by any chance, using Debian, or a Debian-based distro? The stock OptiPNG that comes with Debian was still at version 0.6.4, last time I checked. Maybe you had that version installed, indirectly?

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 31, 2014

nope, using ubuntu 13 here

@kevva
Copy link
Member

@kevva kevva commented Mar 31, 2014

Does which optipng give you anything?

@ctruta
Copy link

@ctruta ctruta commented Mar 31, 2014

@binarykitchen ah, Ubuntu, that's definitely Debian-based, and Ubuntu 13.x ships OptiPNG version 0.6.4.

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Mar 31, 2014

At work now on Ubuntu 13:

$ which optipng
/usr/bin/optipng

and

$ optipng
OptiPNG 0.6.4: Advanced PNG optimizer.
Copyright (C) 2001-2010 Cosmin Truta.
...

So, what now?

@kevva
Copy link
Member

@kevva kevva commented Apr 1, 2014

So you have a global install after all. Just update it to a new version.

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Apr 3, 2014

Okay, works now after recompiling optipng according to
http://kb.imakewebsites.ca/2012/10/16/installing-optipng-0-7-3-on-ubuntu-12-04/

But what happens when I deploy the code on the server? :(

Too bad apt-get does not install/update optipng anymore ...

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented Apr 3, 2014

Hmmm, there is a new problem: JPEG images are corrupted! When I try to open these in the image viewer I see this error message "Error interpreting JPEG image file (Improper call to JPEG library in state 200)"

@binarykitchen
Copy link
Author

@binarykitchen binarykitchen commented May 5, 2014

@kevva Ummm, I am having these issues again after installing a new machine.

I wonder why you guys aren't adding https://github.com/yeoman/node-optipng-bin to package.json?

@morgoth
Copy link

@morgoth morgoth commented May 23, 2014

I had the same problem.
I'm on Ubuntu 14.04.
I removed optipng from my system and it works now.

@Misterhex
Copy link

@Misterhex Misterhex commented Aug 15, 2015

@binarykitchen +1 for adding https://github.com/yeoman/node-optipng-bin to package.json, worked for me on ubuntu 14.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
@morgoth @vladikoff @binarykitchen @kevva @Misterhex @jamesplease @ctruta and others
You can’t perform that action at this time.