Re-send: the list server bounced it a few days ago...
Chet Haase wrote:
> Hi Rick,
> A good general approach is to copy any image into the image type
> you'd actually like to use. For example, if you are going to
> be using an image as a source for copies to the Swing window or
> to other images, create a compatible image:
> gc.createCompatibleImage(w, h)
> where (w,h) come from the dimensions of your loaded image and
> gc is a suitable GraphicsConfiguration.
> Once you have an image in the type you desire, just get the
> Graphics for it and copy the original image into it:
> Graphics g = newImage.getGraphics();
> g.drawImage(originalImage, 0, 0, null);
> Then just use newImage instead of your original image...
> Rick Root wrote:
>> I'm trying to do some image manipulation of some jpegs using java code
>> running on jre 1.4.2_11
>> When I call the getType() method on the BufferedImage objects after
>> loading the jpeg images.. they will sometimes return a value of 0
>> I have a hard time manipulating these images.
>> I did a little testing with an image using Photoshop 7 and a picture
>> from my digital camera. I saved 3 copies of it... all the standard
>> settings for a jpeg... but with different Format settings.. Baseline
>> "Standard", Baseline "Optimized", and Progressive.
>> The first two end up with an image type of 0, while the progress jpeg
>> seems to be the only one I can work with. It returns an image type of
>> So, my question is... since I can't manipulate images with custom
>> image types.. how do I deal with this using standard java2d apis
>> included with Java 1.4.2?
>> To unsubscribe, send email to firstname.lastname@example.org and include in the
>> of the message "signoff JAVA2D-INTEREST". For general help, send
>> email to
>> email@example.com and include in the body of the message "help".
To unsubscribe, send email to firstname.lastname@example.org and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
email@example.com and include in the body of the message "help".
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.