Document + change name.
"keepRawPngs" is a bit confusing since we tend to refer to the FastImageIO format as "raw" git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@933 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -361,12 +361,13 @@ public class TileSetBundler
|
|||||||
* @param target the tileset bundle file that will be created.
|
* @param target the tileset bundle file that will be created.
|
||||||
* @param bundle contains the tilesets we'd like to save out to the bundle.
|
* @param bundle contains the tilesets we'd like to save out to the bundle.
|
||||||
* @param improv the image provider.
|
* @param improv the image provider.
|
||||||
* @param imageBase the base directory for getting images for non
|
* @param imageBase the base directory for getting images for non-ObjectTileSet tilesets.
|
||||||
* ObjectTileSet tilesets.
|
* @param keepOriginalPngs bundle up the original PNGs as PNGs instead of converting to the
|
||||||
|
* FastImageIO raw format
|
||||||
*/
|
*/
|
||||||
public static boolean createBundleJar (
|
public static boolean createBundleJar (
|
||||||
File target, TileSetBundle bundle, ImageProvider improv, String imageBase,
|
File target, TileSetBundle bundle, ImageProvider improv, String imageBase,
|
||||||
boolean keepRawPngs)
|
boolean keepOriginalPngs)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
// now we have to create the actual bundle file
|
// now we have to create the actual bundle file
|
||||||
@@ -396,7 +397,7 @@ public class TileSetBundler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if this is an object tileset, trim it
|
// if this is an object tileset, trim it
|
||||||
if (!keepRawPngs && (set instanceof ObjectTileSet)) {
|
if (!keepOriginalPngs && (set instanceof ObjectTileSet)) {
|
||||||
// set the tileset up with an image provider; we
|
// set the tileset up with an image provider; we
|
||||||
// need to do this so that we can trim it!
|
// need to do this so that we can trim it!
|
||||||
set.setImageProvider(improv);
|
set.setImageProvider(improv);
|
||||||
@@ -431,7 +432,7 @@ public class TileSetBundler
|
|||||||
File ifile = new File(imageBase, imagePath);
|
File ifile = new File(imageBase, imagePath);
|
||||||
try {
|
try {
|
||||||
BufferedImage image = ImageIO.read(ifile);
|
BufferedImage image = ImageIO.read(ifile);
|
||||||
if (!keepRawPngs && FastImageIO.canWrite(image)) {
|
if (!keepOriginalPngs && FastImageIO.canWrite(image)) {
|
||||||
imagePath = adjustImagePath(imagePath);
|
imagePath = adjustImagePath(imagePath);
|
||||||
jar.putNextEntry(new JarEntry(imagePath));
|
jar.putNextEntry(new JarEntry(imagePath));
|
||||||
set.setImagePath(imagePath);
|
set.setImagePath(imagePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user