SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Creating vector graphics

    I have a client that needs text placed on a supplied vector graphic, and that text needs to be vector information, so that the final image is a vector graphic that he can use with his laser CNC machine.

    I've worked with GD before, but I've not seen any functionality that allows for what I've been asked to do.

    So, my questions are:
    1. Is this possible?
    2. if so, how can it be done?


    Any help would be greatly appreciated!
    John

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Litebearer!
    John

  4. #4
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IM convert bitmap -> vector

    Follow up.

    I've been pouring over the IM docs about vector graphics, but I'm not that well versed in manipulating images. So, what I found at the bottom was this paragraph:

    ---
    SVG Output Handling

    As of IM v6.4.2, IM can convert ANY bitmap image into an SVG vector graphic! The conversion is not always successful, but larger and/or simpler images (like a bitmap mask) will convert very well. For example here I convert a horrible bitmap shape into a SVG image, then convert it back again, so as to smooth the bitmap into a proper anti-aliased shape.

    convert -pointsize 72 -font Candice label:A -threshold 50% \ -trim +repage -bordercolor white -border 5x5 A.gif
    convert A.gif A.svg
    convert A.svg A.png
    ---

    It would appear that in the version talked about I could perform the manipulations to the images using the GD library and save them as a bitmap image, then execute the IM line:

    exec('usr/bin/convert image.png image.svg');

    in order to get the final vector graphic that I need. However, it does not seem to be working, and I'm not sure how to test (as I don't have command line access) to see what version is being run.

    Do any of you see a problem in this solution to what I need? If so, please let me know where I've gone wrong.

    Thanks.
    John


Bookmarks

Posting Permissions

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