Hi:

I am having some trouble trying to scale an indexed color image using
AffineTransformOp.
I was wondering if anyone could provide me with some help or point me in the
right direction.  The code I am uing is:

long factor = .25;
AffineTransform at = new AffineTransform();
at.setToScale(factor,factor);
AffineTransformOp op = new AffineTransformOp(at,
AffineTransformOp.TYPE_BILINEAR);

BufferedImage res = op.filter(img, null);
end = System.currentTimeMillis();

img is an 8-bit indexed color image that I created explicitly using
application data.  It hasan IndexColorModel that I populated with the
correct red, green and blue LUTs, and
a DataBufferByte.  The useful and informative Exception that is getting
thrown is:

java.awt.image.ImagingOpException: Unable to transform src image        at
java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:258)

So, can anyone tell me if AffineTransforms are even legal on indexed color
images? I can send the image too if that will help (specify the format,
though...)

One strange thing is that if I set all LUT's to be the same (i.e, grayscale)
everything works fine.


Carlos M. Rodriguez, Senior Systems Engineer
Wellogic, Inc.
222 Third St. Suite. 2220. Cambridge, MA 02142

"Your dependence upon Moore's law is inversely
proportional to your ability as a programmer"
         -Buzzword's Corollary to Moore's Law

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to