ant-build-script icon indicating copy to clipboard operation
ant-build-script copied to clipboard

Image optimization in subfolders

Open rrelmy opened this issue 12 years ago • 1 comments

If there are jpegs in sub directory of the image_dir there are errors with jpegtran. Because the sub directory does not exists the image can't be saved:

[apply] .\jpegtran.exe: can't open .\publish\img\projekte\paf\screen.jpg for writing

Am I doing something wrong? :) This happens on windows and unix, I didnt check with mac.

rrelmy avatar Mar 22 '13 13:03 rrelmy

I solved the nested directory problem by copying the directory structure before running the jpegtran tool:

<!-- Make sure nested directories exist -->
<copy todir="./${dir.publish}/${relative.image.dir}">
    <dirset dir="${dir.source}/${relative.image.dir}"/>
</copy>

<apply executable="${jpegtran.executable}" dest="./${dir.publish}/${relative.image.dir}" osfamily="${os.family}">
    ...
</apply>

Don't know if this can also be applied to the other image processing tools.

hpehl avatar Jul 17 '13 10:07 hpehl