STOP SENDING US MESSAGES !

Dmitri Trembovetski wrote:

>   It'd also help if you specify the jdk version you're using, and the
>   platform you're running it on.
>
>   Thank you,
>     Dmitri
>
> On Tue, Jun 24, 2003 at 05:28:58PM -0700, Chris Campbell wrote:
>  > Hi Carlos,
>  >
>  > I'm not entirely sure what you mean when you say the pixels are messed
>  > up, but it doesn't look like you're doing anything wrong.  You may have
>  > hit a bug in AffineTransformOp.  Please submit a bug report and attach
>  > a simple testcase that we can run to reproduce the problem.
>  >
>  > You may be able to work around the problem by copying the resulting
>  > INT_ARGB BufferedImage into a BI of the same type as your source when
>  > the AffineTransformOp is finished processing.  Then you can use that
>  > image with the rest of your image processing routines.
>  >
>  > Thanks,
>  > Chris
>  >
>  > On Tuesday, June 24, 2003, at 04:10  PM, Carlos Rodriguez wrote:
>  > >Hi:
>  > >
>  > >I am encountering a very bizarre problem while trying to scale a 16-bit
>  > >UShort image using the AffineTransformOp class.  Basically what happens
>  > >is that, if I create a compatible destination image with the
>  > >createCompatibleDestImage() method,  when I actually call the filter
>  > >method the resulting image has its pixels messed up.  However, if I
>  > >leave
>  > >it to the filter method (by setting the second arg to null), the pixels
>  > >*look* good, but they are RGB and therefore unusable for any further
>  > >image
>  > >processing (at least to me).  For some reason the latter method
>  > >produces a
>  > >TYPE_INT_ARGB image.  Can anyone help me understand this?
>  > >
>  > >Here's the code (where img is being passed in):
>  > >
>  > >double factor           = 0.25;
>  > >AffineTransform at      = new AffineTransform();
>  > >at.setToScale(factor, factor);
>  > >AffineTransformOp op    = new
>  > >AffineTransformOp(at,AffineTransformOp.TYPE_BILINEAR);
>  > >BufferedImage retval    = op.createCompatibleDestImage(img,
>  > >img.getColorModel());
>  > >//
>  > >//this one will produce an image of the correct type, but broken
>  > >//
>  > >BufferedImage result = op.filter(imgs[0], retval );
>  > >//
>  > >//this one will produce an image that looks good but is of the wrong
>  > >type:
>  > >//
>  > >BufferedImage result2 = op.filter(img, retval );
>  > >
>  > >
>  > >The relevant aspects of the source image are (dumped from the
>  > >debugger):
>  > >
>  > >colorModel= java.awt.image.ComponentColorModel  (id=46)
>  > >imageType= 11
>  > >raster= sun.awt.image.ShortInterleavedRaster  (id=61)
>  > >    dataBuffer= java.awt.image.DataBufferUShort  (id=64)
>  > >    height= 2457    width= 2048    numBands= 1
>  > >sampleModel= java.awt.image.PixelInterleavedSampleModel  (id=67)
>  > >     dataType= 1     numBands= 1    numBanks= 1     pixelStride= 1
>  > >scanlineStride= 2048
>  > >
>  > >Thanks in advance for your help.
>  > >
>  > >-Carlos Rodriguez
>  > >
>  > >P.S. I can't use JAI.
>  > >
>  > >=======================================================================
>  > >====
>  > >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".
>  >
>  > ===========================================================================
>  > 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".
>
> ===========================================================================
> 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".

===========================================================================
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