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

How do I use the imageAlpha functionality? #2

Closed
joeldbirch opened this issue Jun 8, 2013 · 4 comments
Closed

How do I use the imageAlpha functionality? #2

joeldbirch opened this issue Jun 8, 2013 · 4 comments

Comments

@joeldbirch
Copy link

This is amazing because optimising pngs is one of the parts of my process that still requires manual effort. Thanks for your work.

I could easily be mistaken, but grunt-contrib-imagemin seems to do what imageOptim does, but I'm really keen on grunt-imageoptim for its apparent imageAlpha integration. I'm imagining a perfect scenario where it allows me to set a default imageAlpha options (eg. 32 colours, Median Cut, Dithered) and have those applied to pngs before running imageOptim.

However, I'm having a trouble figuring out how to get imageAlpha to work at all. Are there any undocumented options I should add to its grunt config? I tried to get imageAlpha to happen via raw command line (just to see it work) via imageOptim -da 'assets/img' but that just brings up the usage info. However, imageOptim -d 'assets/img' does run imageOptim on the images, so that seems to be installed okay.

I'm probably missing something here, but if anyone could enlighten me on this I'd be most appreciative.

@joeldbirch
Copy link
Author

Okay, I just tried imageOptim --image-alpha --directory 'assets/img' and imageAlpha opened and seemed to do…stuff…to each image, which is great. It seems like it simply sets 256 colours, which is safe, but I'd love to be able to set the default options to 32 colours. I guess maybe imageAlpha is not part of the grunt plugin yet (please confirm) and I should be posting this over on the cli repo.

@JamieMason
Copy link
Owner

Thanks a lot @joeldbirch, here are some responses;

  • I've created an issue with an explanation for your question on options not working as expected, that should hopefully explain it all for you in the meantime until it's closed. I'll update the README too.
  • I've created an issue to investigate overriding ImageAlpha default options, this one may take a little longer to implement as ImageAlpha doesn't expose any access to setting those options via script as yet.

Thanks again, anything else you spot please raise an issue.

@JamieMason
Copy link
Owner

Hey @joeldbirch, I'll close this as the other issues you mentioned are tracked elsewhere. Thanks.

@joeldbirch
Copy link
Author

Great, thanks. :)

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

No branches or pull requests

2 participants