I think I've discovered at least one problem that you are running into -
we don't have an optimized loop to convert from 1-bit binary images to
INT_RGB images. Further, the general code that gets used doesn't take
the best advantage of the existing optimized loops that do exist.
We only have
jav...@javadesktop.org wrote:
- let us know what image formats you are seeing in the loaded image and
which Reader is loading it so we can consider adding loops that deal
with that format more directly (or modifying our format detection code
to recognize it if there is something amiss with our
Hello Jim,
you have provided here so much valuable information that i doubt if i have
found that before all in one place, THANK YOU.
Let me come to some specifics:
What is the image format you are using in the TIFF file and what are the
parameters of the *Models it uses to represent it in
Thank you for all your answers, there is one question not answered yet:
Is it possible to create a BufferedImage with a custom DataBuffer that can be
put in the video-cache?
Costas
[Message sent by forum member 'csterg' (csterg)]
http://forums.java.net/jive/thread.jspa?messageID=349659
jav...@javadesktop.org wrote:
Thank you Dmitri for your answer.
Let me just say a bit more of the problem and why i go to this method:
My goal is to find the faster way to load an image from the disk (a tif file,
either binary or colored) and display it on the screen in a compatible way
(e.g.
The first thing that you will have to understand is
that Java is going to be slower than anything except maybe Flash.
If your goal s to be as fast as C, C++, C# or .Net then you should
find another goal
because it is already a given that Java will be slower.
You mix up runtime enviroments
Last time I looked, both C and C++ had runtime code -- I suppose
one could dispute that that code created a runtime environment. I
wouldn't argue with that.
And if the design of an API is so complex that the average programmer can't
understand how to use it is the hallmark of good design --
Thank you Dmitri for your answer.
Let me just say a bit more of the problem and why i go to this method:
My goal is to find the faster way to load an image from the disk (a tif file,
either binary or colored) and display it on the screen in a compatible way
(e.g. fast to redraw, pan, zoom,
The first thing that you will have to understand is that Java is
going to be slower than anything except maybe Flash. If your goal
is to be as fast as C, C++, C# or .Net then you should find another goal
because it is already a given that Java will be slower.
Another way to display an image is
Could you please show the code which creates the BufferedImage?
Thanks,
Dmitri
jav...@javadesktop.org wrote:
Hi all,
I am trying to create a BufferedImage manually (e.g. via the constructor) and i
am using the DirectColorModel and the SinglePixelPackedSampleModel. I am trying
to
Of course.
Here is a proc that converts a binary image to a compatible RGB:
public static BufferedImage
convertToSinglePixelPackedSampleModel_BINARY(BufferedImage image) {
int[] bitMasks = new int[]{0x00ff, 0xff00, 0x00ff};
SinglePixelPackedSampleModel sampleModel = new
Of course.
Here is a proc that converts a binary image to a compatible RGB:
[code]
public static BufferedImage
convertToSinglePixelPackedSampleModel_BINARY(BufferedImage image) {
int[] bitMasks = new int[]{0x00ff, 0xff00, 0x00ff};
SinglePixelPackedSampleModel sampleModel =
The problem with your first method is that you are creating the image with
your own DataBuffer. This prohibits this image from ever being cached in video
memory since we can not guarantee that the cache will be up to date with the
original image. Thus the image is unmanageable.
I'm not
13 matches
Mail list logo