Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Resizing an image without losing transparency

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Thanked 2 Times in 2 Posts

    Default Resizing an image without losing transparency

    I'm making an image editing software in java and need to resize the images so that users can edit images pixel by pixel. However, whenever I use image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH); the image loses its transparency. All the image files I use are png's. How do I resize an image without losing transparency?

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 636 Times in 540 Posts

    Default Re: Resizing an image without losing transparency

    Can you put together an SSCCE that demonstrates exactly what you're doing? That way we can play with it and see if we can find a solution for you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Setting a transparency level of a picture issue
    By Asido in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 18th, 2012, 05:42 AM
  2. Replies: 3
    Last Post: July 17th, 2012, 11:59 PM
  3. [SOLVED] Image Resizing
    By usama8800 in forum Java Theory & Questions
    Replies: 4
    Last Post: July 1st, 2012, 03:40 AM
  4. Image transparency issue
    By Brt93yoda in forum Java Theory & Questions
    Replies: 6
    Last Post: August 31st, 2010, 02:25 PM

Tags for this Thread