Mathew Chacko wrote:

> I am trying to create an Graphics image at run time and write it out
> to a file using the JPEG encoding provided with JDK1.2. The image
> consists of mostly text, lines and barcode images.
> 
> The lines come out fine, but the text is blurred. I am including some of
> the code. Any help would be appreciated.

        I believe the problem here is a limitation of the JPEG format itself.
It was designed to  represent natural images, i.e. pictures, and not
computer-generated images with sharp changes in hue and brightness.
        Please read the JPEG FAQ at the following URL for more information:
        http://www.cis.ohio-state.edu/hypertext/faq/usenet/jpeg-faq/top.html

        If you could encode these images in another format, such as GIF or
TIFF, these problems would probably not occur. I once found a free Java
class to enconde TIFF images, but I can't seem to find it again.

--
---------------------------------------------------------------
  Alexandre Sieira Vilar - http://www.tecgraf.puc-rio.br/~asv
 Computer Engineering Student at PUC-Rio - GNU and Linux rock!
     3rd kyu Aikikkai Aikidoka (as of November 28, 1998)
---------------------------------------------------------------
"The finest works of art are precious,  among other reasons, 
because  they  make  it  possible  for us  to know,  if only 
imperfectly  and for a little while, what it actually  feels 
like to think subtly and feel nobly."

                                   Aldous Huxley
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/

Reply via email to