It's not a perfect solution, but make it so we can call the tile trimming task and

not actually write out new image to a file if we don't need to. 

This cuts my tileset building from 42 seconds to 22 when no files have changed 
(as opposed to 4 when it was skipping it altogether, but winding up with a hosed 
tsbundles.dat), so it's at least a decent bit better.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@391 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2008-01-10 19:51:24 +00:00
parent 9458c0704a
commit 9733142d35
2 changed files with 22 additions and 17 deletions
@@ -151,11 +151,13 @@ public class TileSetTrimmer
xoff += tb.width;
}
// write out trimmed image
if (imgFormat == null || FastImageIO.FILE_SUFFIX.equals(imgFormat)) {
FastImageIO.write(image, destImage);
} else {
ImageIO.write(image, imgFormat, destImage);
if (destImage != null) {
// write out trimmed image
if (imgFormat == null || FastImageIO.FILE_SUFFIX.equals(imgFormat)) {
FastImageIO.write(image, destImage);
} else {
ImageIO.write(image, imgFormat, destImage);
}
}
}
}