I'd varargified this a while back w/o getting around to committing it.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@848 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2009-08-17 21:45:35 +00:00
parent d8ae0c7877
commit ed81ddb402
@@ -42,6 +42,8 @@ import java.awt.image.IndexColorModel;
import java.awt.image.Raster; import java.awt.image.Raster;
import java.awt.image.WritableRaster; import java.awt.image.WritableRaster;
import com.samskivert.util.Logger;
import com.samskivert.swing.Label; import com.samskivert.swing.Label;
/** /**
@@ -120,14 +122,12 @@ public class ImageUtil
/** /**
* Recolors the supplied image using the supplied colorizations. * Recolors the supplied image using the supplied colorizations.
*/ */
public static BufferedImage recolorImage ( public static BufferedImage recolorImage (BufferedImage image, Colorization[] zations)
BufferedImage image, Colorization[] zations)
{ {
ColorModel cm = image.getColorModel(); ColorModel cm = image.getColorModel();
if (!(cm instanceof IndexColorModel)) { if (!(cm instanceof IndexColorModel)) {
String errmsg = "Unable to recolor images with non-index color " + throw new RuntimeException(Logger.format(
"model [cm=" + cm.getClass() + "]"; "Unable to recolor images with non-index color model", "cm", cm.getClass()));
throw new RuntimeException(errmsg);
} }
// now process the image // now process the image