Open cmalven opened 12 years ago
Okay, I'm getting somewhere.
Removing the -ext .png -force
arg successfully processes the images and copies them to the publish
folder. However, it actually process the images in the original img
directory, and leaves them there! Which is not good at all, because it means that we're modifying the original project.
Also, each pngquant
pass in the build script outputs this to the terminal:
[apply] error: cannot open /Users/blah/project/publish/img/contact-form-bg-left.png for reading
[apply] Result: 2
(back from a crummy weekend)
I found this:
https://github.com/znerd/pngquant-ant-task
Might be of use.
I'll try to take a look after I clean up #36
I'm going to look at adding this as an optional task, but in a later release.
A site I'm currently working on makes very heavy use of transparent PNGs, and I've found that by running pngquant on the entire project I can get tremendous savings in file size.
I'm sure you see where I'm going with this. I'd love to have the build script do this for me. It seems like it would be pretty simple, and I've already taken an unsuccessful stab at it:
-ext .png -force
forces a replace of the existing files, and256
sets the amount of colors to use. These are the only args I've ever needed for pngquant.The "pngquant.exe" is in the place it should be. In fact, the build script is finding it and displaying the "help" for it, but then the script just hangs which makes me think my settings somewhere else are incorrect. I know nothing about working with Ant, and the documentation is pretty intimidating (the Ant documentation, not the HTML5BP docs, which are great).
Anybody have any ideas?