Results 1 to 2 of 2
  1. #1
    Panchitopro is offline Member
    Join Date
    May 2008
    Rep Power

    Default How to draw 2 images with quality?


    I would like to ask for your help please. I try to display at least 2 images with a size 3456 x 2304 px in a container (individualy) with a size 372 x 246.

    When I use drawImage method I lose the quality in the images.

    How can I do to display them with quality?

    I saw a little bit the code from the thread of "Image resizing" and I saw the use of Graphics2D g2 = (Graphics2D)g; and g2.setRenderingHint().

    I need to use Graphics2D?

    I would like to consider the next note because the solution could be affected by the versions:

    I have had some problems using components like SWING components, because my applet is used sometimes in computers with the MS VM and some instructions from java do not work properly. So I use just AWT components. In this way, I wonder if the use of javax.* could affect the versions which use MS VM?

    I hope that my message is clearly

    Thank you

  2. #2
    strati1991 is offline Member
    Join Date
    Mar 2009
    Rep Power


    you can use
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATI ON,RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASIN G,RenderingHints.VALUE_ANTIALIAS_ON);
    to improve the quality

Similar Threads

  1. Trying to use Graphics draw methods
    By Lang in forum SWT / JFace
    Replies: 5
    Last Post: 03-26-2008, 06:49 AM
  2. Draw an arrow
    By Albert in forum SWT / JFace
    Replies: 3
    Last Post: 02-01-2008, 09:11 AM
  3. help me draw... please...
    By kureikougaiji in forum New To Java
    Replies: 1
    Last Post: 01-28-2008, 01:22 PM
  4. Draw on JPanel, Help
    By carl in forum Java 2D
    Replies: 1
    Last Post: 07-31-2007, 07:56 AM
  5. how to draw in Java
    By Heather in forum AWT / Swing
    Replies: 2
    Last Post: 07-12-2007, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts