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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 2 of 2

Thread: Vector Images in Java

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Vector Images in Java

    Hi,
    I want to use vector images in my code.This is because I've used raster images(.png) previously in my code inorder to set the icon for my jlabel.

    When I work in high resolution monitor, the images are not resizing properly.
    So, I want to convert raster images to vector images and then I want to use those images in my jlabel.

    So, pls tell me how to convert raster image to vector image and how to use the vector image in my jlabel.

    Thanks in advance,

    M.Sivapreeya


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Vector Images in Java

    Unfortunately I don't think there's a good method to do this. Vector images store data about how to draw the image, which is difficult if not impossible to recover accurately from a raster image. There are two possible solutions:
    1. Redraw the icons using a vector graphics program.
    2. Redraw the icons using a raster graphics program but make the icons higher resolution. Note that high resolution images don't necessarily scale down that well.

Similar Threads

  1. HELP: I have problem casting from Vector to Integer in Java
    By tintin in forum What's Wrong With My Code?
    Replies: 7
    Last Post: November 17th, 2011, 12:39 PM
  2. Usig Images from the web in Java
    By Zeek in forum What's Wrong With My Code?
    Replies: 6
    Last Post: August 28th, 2011, 02:12 PM
  3. Vector Math in Java
    By Spidey1980 in forum Java Theory & Questions
    Replies: 7
    Last Post: August 18th, 2011, 12:05 PM
  4. Java: Links, images, font and divisions with HTML / CSS
    By Cyloc in forum AWT / Java Swing
    Replies: 3
    Last Post: August 2nd, 2011, 12:54 PM
  5. Replies: 2
    Last Post: December 22nd, 2010, 09:21 AM