Re: highlighting word in JPEG image
- From: Marian Hellema <nospam>
- Date: Wed, 29 Jun 2005 20:12:08 +0200
Dear Chris,
Thanks a lot for your postings! You're right: I changed my code to draw the image before setting the AlphaComposite and I removed the clearRect() line; now the colors look fine.
Your code to find out the resolution of the JPEG looks interesting. I did not yet really try it, but it might be useful later on.
About my assumption that Java works in 72 dpi, I got that from an article on http://java.sun.com/developer/technicalArticles/GUI/java2d/java2dpart1.html
As I understand it now, this applies to the user space, where I thought my program was working, but apperently not. Never mind, as long as it works :-)
Again, thank you for your help! Best regards, Marian
Chris Smith wrote:
Marian Hellema <lujanp@xxxxxxxxxx> wrote:
- The version I post below has a color problem. I fiddled with the AlphaComposite value, but the original JPEG is either too dark or too pale compared to the orginal.
Have you tried drawing the original JPEG before setting an AlphaComposite? You should only need to perform alpha-compositing for the highlight, not the original image.
.
- References:
- highlighting word in JPEG image
- From: Marian Hellema
- Re: highlighting word in JPEG image
- From: Chris Smith
- highlighting word in JPEG image
- Prev by Date: Re: ProgressMonitor takes too long to display in Sun's ProgressMonitorDemo
- Next by Date: How to make default font w/ metal Laf using Synth
- Previous by thread: Re: highlighting word in JPEG image
- Next by thread: [ANN] XAMJ - New Java XML GUI Language
- Index(es):