Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread java2d
Hi Dmitri,

your Graphics Configuration Update Test works as expected. The title of the 
window changes each time it is dragged to an other screen.

So, could it be that the recognition of the current screen device can depend on 
the overall load of the system? I mean, your test program is very small and 
should not bother even the slowest system but our software is much more bigger 
and therefore maybe the system can't provide the right graphics device every 
time the window is dragged on an other screen. Is this possible?

I think that this might be so because I never have any problems with my code on 
my development machine. Only on the target system, which is much slower.

Thanks,
Maik
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291253

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


Re: [JAVA2D] Should drawGlyphVector() honour rendering hints?

2008-08-04 Thread java2d
I have been unable to reproduce the problem in a test case which leads me to 
conclude that the code I have been looking at is doing something more than just 
drawing glyphs such as font scaling.  I'll dig a bit further.  Basically, I am 
trying to determine why the Batik SVG toolkit renders text so poorly, even with 
Java 6 Update 10.

The only differences I can see between the output of drawString() and 
drawGlyphVector() can be attributed to the LCD contrast settings which are not 
configurable when drawing the glyphs directly I believe.

If anyone can explain why text rendering in Batik is so poor I would love to 
hear from you.

-- 
And loving it,

-Qu0ll (Rare, not extinct)
_
[EMAIL PROTECTED]
[Replace the SixFour with numbers to email me]
[Message sent by forum member 'qu0ll' (qu0ll)]

http://forums.java.net/jive/thread.jspa?messageID=291260

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


Re: [JAVA2D] Image Rendered in Negative as I swtich the app from one monitor to another

2008-08-04 Thread java2d
Hi magpie,

Are you sure you are using the VolatileImage in the way outlined in the 
JavaDoc?  Basically you need to validate the image and re-render if the 
contents are lost or invalid for the current graphics configuration.  It's a 
bit tedious but necessary when using a VI.

I am not sure if this is relevant to your problem but let's eliminate that 
first before looking for other solutions.

-- 
And loving it,

-Qu0ll (Rare, not extinct)
_
[EMAIL PROTECTED]
[Replace the SixFour with numbers to email me]
[Message sent by forum member 'qu0ll' (qu0ll)]

http://forums.java.net/jive/thread.jspa?messageID=291261

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


[JAVA2D] Compositing

2008-08-04 Thread Adam Augusta
I'm having trouble compositing transparent CMYK images with JAI, so
I'm wondering how frightfully ill-advised it would be -
performance-wise - to simply loop through the pixels on a
BufferedImage and composite them manually.

-Adam

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


Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-04 Thread java2d
I am trying to add one image above another image.
And tried alpha from 0 to 1, they all did not work.
So what's right way to do this?
[Message sent by forum member 'jiezhang' (jiezhang)]

http://forums.java.net/jive/thread.jspa?messageID=291351

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


Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-04 Thread Harald Kuhr

Hi,

You can't do an alpha-blended composition of two bi-level images, as a  
bilevel image has only two levels, either completely white or  
completely black. So you first have to create a new temporary true  
color BufferedImage (any of the TYPE_INT_RGB or TYPE_3/4BYTE_RGB/BGR  
will probably do fine), and then draw both your images into that. Use  
alpha only for the second image. Good luck! ;-)



--
Harald K


On 4. aug.. 2008, at 17.50, [EMAIL PROTECTED] wrote:


I am trying to add one image above another image.
And tried alpha from 0 to 1, they all did not work.
So what's right way to do this?
[Message sent by forum member 'jiezhang' (jiezhang)]

http://forums.java.net/jive/thread.jspa?messageID=291351

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


Re: [JAVA2D] drawimage exception

2008-08-04 Thread java2d
This problem was solved by correctly constructing Buffered Images.
[Message sent by forum member 'jiezhang' (jiezhang)]

http://forums.java.net/jive/thread.jspa?messageID=291364

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


Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-04 Thread java2d
That way should work. Another way to make it work is converting the first one 
to gray image and draw the second on it. 
But I am hoping to get thing done without introducing the third image or doing 
a content conversion.
[Message sent by forum member 'jiezhang' (jiezhang)]

http://forums.java.net/jive/thread.jspa?messageID=291369

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


Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread Dmitri Trembovetski

[EMAIL PROTECTED] wrote:

Hi Dmitri,

your Graphics Configuration Update Test works as expected. The title of the 
window changes each time it is dragged to an other screen.

So, could it be that the recognition of the current screen device can depend on 
the overall load of the system? I mean, your test program is very small and 
should not bother even the slowest system but our software is much more bigger 
and therefore maybe the system can't provide the right graphics device every 
time the window is dragged on an other screen. Is this possible?


  To be honest I doubt it. I never seen this happen. But you can
  easily test this. Add a little sleep in your rendering loop and
  see if it helps on that slow system.

  Thanks,
Dmitri





I think that this might be so because I never have any problems with my code on 
my development machine. Only on the target system, which is much slower.

Thanks,
Maik
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291253

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


Re: [JAVA2D] drawimage on a bilevel image does not work

2008-08-04 Thread Dmitri Trembovetski

  Have you tried without extra alpha? Just with the default
  SrcOver compositing mode?

  Thanks,
Dmitri

[EMAIL PROTECTED] wrote:

I am trying to add one image above another image.
And tried alpha from 0 to 1, they all did not work.
So what's right way to do this?
[Message sent by forum member 'jiezhang' (jiezhang)]

http://forums.java.net/jive/thread.jspa?messageID=291351

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


Re: [JAVA2D] Image Rendered in Negative as I swtich the app from one monitor to another

2008-08-04 Thread Dmitri Trembovetski

  Have you tried your app with more recent jdk? Like 6u7 
(http://java.sun.com/javase/6/)
  or 6u10 (http://jdk6.dev.java.net)?

  Thanks,
Dmitri


[EMAIL PROTECTED] wrote:

Hi there,

I've got a problem with imaging.

I'm running java 1.6.0_03-b05.
Window XP on dualview.

I've got a rendering engine that draws images and shapes on a backbuffer 
(VolatileImage) and then eventually draws it back on a Jpanel. Most of the time 
it all works fine but on occasion when I move the application from one monitor 
to another the rendered image shows up in negative. Sometime the image comes 
back fine when I move the application back again to the other monitor but on 
occasion I just can't get it back.
The internal process of switching monitor is handled by stopping rendering, 
overwritting the back buffers with new VolatileImages and re rendering.

Has anyone ever encountered something like this?

Thank you.
[Message sent by forum member 'magpie' (magpie)]

http://forums.java.net/jive/thread.jspa?messageID=291228

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


Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread java2d
 To be honest I doubt it. I never seen this happen.
Okay, but what is the explanation for the fact that I NEVER have this problem 
on the other system although it is 100% the same code? I mean, i don't want to 
say that my code is without some errors, but it should happen on both machines, 
if it is code related, right?

  But you can
 easily test this. Add a little sleep in your
  rendering loop and
   see if it helps on that slow system.
I will try that tomorrow . . . .

Thanks, Maik
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291379

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


Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread Dmitri Trembovetski

[EMAIL PROTECTED] wrote:

To be honest I doubt it. I never seen this happen.

Okay, but what is the explanation for the fact that I NEVER have this problem 
on the other system although it is 100% the same code? I mean, i don't want to 
say that my code is without some errors, but it should happen on both machines, 
if it is code related, right?


  There are many reasons why the same code may behave differently
  on different systems. Timing issues is one of them (you can get
  a deadlock on one system every time, and never on another).

  Certainly there's some hw or setup difference that's somehow
  affecting the behavior.

  Does your rendering loop run on the event dispatch thread
  or some other thread?

  Thanks,
Dmitri



 But you can
easily test this. Add a little sleep in your
 rendering loop and
  see if it helps on that slow system.

I will try that tomorrow . . . .

Thanks, Maik
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291379

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


Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread java2d
Does your rendering loop run on the event dispatch thread
or some other thread?

Well, I am not that familiar with the event dispatch thread and myabe that's 
the problem in my code . . . .

To render my image, which should happen at a fixed rate of 20Hz, I use a Timer 
which calls my render method in its scheduleAtFixedRate() method. 
In my render method, I check for the graphicsConfiguration and call the 
validate() method of my vlatile image. After that, i draw my stuff on the 
Graphics2D object of the image. Finally, i call the paint()-method (I think it 
is so, will check that tomorrow at work) of the panel in which the image is 
situated and let the image be displayed.

I don't know, if all that happens in the event dispatch thread, but I assume it 
should be, right . . . . ?
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291427

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


Re: [JAVA2D] VolatileImage.validate() does not (always) work

2008-08-04 Thread Ken Warner

Do you call paint method directly or indirectly through
repaint()?

[EMAIL PROTECTED] wrote:

Does your rendering loop run on the event dispatch thread
or some other thread?



Well, I am not that familiar with the event dispatch thread and myabe that's 
the problem in my code . . . .

To render my image, which should happen at a fixed rate of 20Hz, I use a Timer which calls my render method in its scheduleAtFixedRate() method. 
In my render method, I check for the graphicsConfiguration and call the validate() method of my vlatile image. After that, i draw my stuff on the Graphics2D object of the image. Finally, i call the paint()-method (I think it is so, will check that tomorrow at work) of the panel in which the image is situated and let the image be displayed.


I don't know, if all that happens in the event dispatch thread, but I assume it 
should be, right . . . . ?
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=291427

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


Re: [JAVA2D] Any way to make ANTIALIAS only use one color

2008-08-04 Thread Harald Kuhr

Once again, this time to the list.. ;-)

On 2. aug.. 2008, at 00.24, Jim Graham wrote:

Since it doesn't seem to be working well with your particular  
colormap, my suggestion is to not use Antialiasing - or to come up  
with a better selection of colors in your colormap that provide  
enough intermediate colors for the AA algorithm to do its job...


One thing you could try, is creating an intermediate image in full RGB  
(copy the indexed image first), then render text with antialiasing to  
the intermediate image. Then either create a new indexed image from  
that (might end up with a different color map), or paint the image  
back to the original indexed image. It usually gives a better result.



--
Harald K

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