Hi,

[EMAIL PROTECTED] wrote:
And here infos that you asked;

İmage info: [EMAIL PROTECTED] //source image that i get with Jimi.

As I read this you are saying that Jimi returned to you a ToolkitImage. Is that correct? I think that was to be expected. Unfortunately printing a ToolkitImage doesn't give any clues as to its internal format like printing a BufferedImage, but we can figure it out from the trace log (see below).

Run time: getScaledInstance() : 718 ms

This is the run time for running your scaling method on the Jimi image, correct?

//the returning scaled result  as buffered image
BufferedImage info : [EMAIL PROTECTED]: type = 1 DirectColorModel: rmask=ff0000 
gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 780 height = 1102 
#Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0

What is this image? Is it the result of running your scaling method on the Jimi image? If so, then this is not what I was asking for - we already know the format of that image, because it is constructed manually in the scaling loop (the call to the BufferedImage constructor). INT_RGB are one of the standard formats which are well supported in our registered graphics loops.

What I was really asking for is what kind of image you get back from the ImageIO.Read call.

and here the trace result;

There was a lot of extraneous information in your trace result. Obviously there is a lot going on in your program and most of it has no bearing at all on what is making the scaling method run slower for the ImageIO image. I just wanted the few logged operations that occured while running your scaling method. If I can make an educated guess without knowing your program, I would say that would be the following lines:

İmage info: [EMAIL PROTECTED]
sun.java2d.loops.TransformHelper::TransformHelper(Index8Gray, SrcNoEa, 
IntArgbPre)
sun.java2d.loops.TransformHelper::TransformHelper(IntRgb, SrcNoEa, IntArgbPre)
Run time: getScaledInstance() : 703 ms
BufferedImage info : [EMAIL PROTECTED]: type = 1 DirectColorModel: rmask=ff0000 
gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 780 height = 1102 
#Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
Run time: init() first scale Render: 1078 ms

and the rest of the log after that looked like other assorted graphics calls that were happening later in your program. Is that correct?

From the above it looks like Jimi returned you an 8-bit grayscale indexed image. (Printing a toolkit image doesn't print its internal format, but you can infer the format by looking at the "source image" type in the first TransformHelper operation.)

I'd be curious to see what kind of image is being returned from ImageIO for your images and what loops are being used for the duration of the scaling method (i.e. just an abbreviated log showing the operations incurred during that one method). I'm guessing it uses a less optimal format for which we might not have TransformHelper loops defined, but I need to know the image format and the loops that were used to provide any more specific information...

                        ...jim

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