A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Vector info please ?

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Queensland Australia
    Posts
    283
    l have just started to use vector graphics (because of flash ) but there are a few things l just dont understand .
    Vectors are supposed to be very small files ,l have a photo and converted it to a vector with P2vector lab ,the original photo is 640x480 jpeg 62kb ,when its converted to a vector -wmf file the size blows out 560kb ,why is this so and how will this file be handled in a flash movie ,better or worse than its much smaller jpg copy , every jpg photo l convert to vectors ends up bigger at the same dimensions as a jpeg .
    Can somebody please fill me in on vectors and the how to use them ,am l supposed to resize the 640x480 vector to a thumbnail and then put it in flash .
    this is a bit confusing ,thanks guys
    Rod

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    843
    I won't claim to be an expert in the vector field, but
    from what I have gathered, vector graphics are usually but
    not exclusively reserved for logo type graphics and more
    none detailed graphics like shapes, circles and such.

    I would imagine that converting a jpeg to vector would severely compromise the quality and appearence of that jpeg.

    I suggest, as has been suggested in the past, to save your
    graphics as .png format then import into Flash.

    my 2 cents

    also Flash has some optimzation setting at export that
    you could try to bring the file size down.

    Rogue

  3. #3
    Moderator CNO's Avatar
    Join Date
    Jun 2000
    Location
    Brooklyn, NY
    Posts
    3,446
    Vector graphics are generally smaller than raster because of the format - raster images are saved as a series of pixels - the larger the image (or higher resolution - both resulting in more pixels per inch), the larger the file size will be because more information is needed. This is why web graphics are saved at 72 dpi - the computer monitors generally can't display more than that. On top of this, different compression methods are used - gif will store information as a string of colors, eg,
    instead of
    RED, RED, RED, RED, RED, GREEN
    it would look like
    REDx5, GREEN
    Jpeg is a "lossy format".

    Vectors, on the other hand, are defined as mathematical equations used to draw shapes - that's why you need an intermediary (in this case, the Flash player) to interpret and draw those shapes. Essentially, instead of defining the color of every pixel, it has an equation to define the outline of the shape.

    The problem you are running into is that by automatically converting a bitmap into a vector image, each discreet area of color in your bitmap is becoming a new vector shape. Naturally, this will mean hundreds if not thousands of individual equations - slower to render and much less efficiently stored than a compressed raster image. The only advantage here is that it can be scaled.

    Two possible solutions would be to either simply use raster images (which will give you results closest to your source, but will not be scaleable unless input at a higher resolution), or tweak your raster trace settings to make it more tolerant of color changes. Similar to the wand tool in a program like Photoshop - the higher the tolerance, the more values of a similar shade it will pick up. This will give you a smaller file size, but the tradeoff is that your images will have more of a "posterized" look filled with lots of flat areas of color.

    Hope this helps!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center