Hi Patrick,
could you please provide more information about preTransImg? In
particular what color model and raster are used?
If you just want to apply scale-only transfrom then you may try
something like:
BufferedImage postTransImg =
affineTransOp.createCompatibleDestImage(preTransImg, null);
Graphics g = postTransImg.createGraphics();
g.drawImahe(preTransImg, 0, 0,
x_scale * preTransImg.getWidth(),
y_scale * preTransImg.getHeight(), null);
This way should work fine with jdk 5.0u2 or recent jdk 6.0 binary
snapshot (b06 or later).
Thanks,
Andrew.
PATRICK, Robert, FM пишет:
In this case they were 1.0 x 2.0816326.
-----Original Message-----
From: Discussion list for Java 2D API [mailto:[EMAIL PROTECTED]
On Behalf Of Andrei Kouznetsov
Sent: 14 April 2005 07:14
To: [EMAIL PROTECTED]
Subject: Re: [JAVA2D] JVM death from AffineTransformOp
Caused from the last line of:
AffineTransform trans = new AffineTransform(new float[]{ xscale, 0f, 0f,
yscale }); AffineTransformOp affineTransOp = new AffineTransformOp(trans,
AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
BufferedImage postTransImg = affineTransOp.createCompatibleDestImage
(preTransImg, null);
affineTransOp.filter(preTransImg, postTransImg);
Where preTransImg is a successfully loaded RenderedImage.
Robert
which values has xscale and yscale?
===========================================================================
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".
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority
This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The Royal
Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our websites at:
http://www.rbs.co.uk/CBFM
http://www.rbsmarkets.com
********************************************************************************
===========================================================================
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".