You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.
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:
<echo message="Now, we run pngquant on the .png files for much smaller files..."/>
<apply executable="${basedir}/${dir.build.tools}/pngquant.exe" dest="./${dir.publish}/${dir.images}/" osfamily="unix">
<fileset dir="./${dir.source}/${dir.images}/" includes="**/*.png" excludes="${images.bypass}, ${images.default.bypass}"/>
<arg value="-ext .png -force"/>
<arg value="256"/>
<targetfile/>
<srcfile/>
<mapper type="identity"/>
</apply>
-ext .png -force forces a replace of the existing files, and 256 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?
The text was updated successfully, but these errors were encountered:
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 originalimg 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
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?
The text was updated successfully, but these errors were encountered: