Problems converting PNG image to SVG with autotrace

Hi,
I am trying to convert a large number of color PNG images of hieroglyphs (produced after much effort) to SVG format, using "autotrace -background-color ffffff -output-format svg".
It seems that where there are closed paths with background color inside, autotrace produces an SVG image with the background area in black instead of transparency. (You can see the images at http://5b4az.chronos.org.uk/pkg/hieroglyph/A001.png and http://5b4az.chronos.org.uk/pkg/hieroglyph/A001.svg although the svg image is not rendered by Firefox). You may also download the tarballs with all the hieroglyphs of the Gardiner set if you are interested.
After all the effort that went into these images, I am stuck with being unable to convert raster images to vector graphics. I did try autotrace before I put in all this effort, but I didn't notice the problem because apparently I tried it on images with no enclosed background color.....
Any suggestions wellcome greatefully!
Last edited by neok (2009-10-17 16:59:31)

I know this is an old thread, but I did some new testing on some line art and want to post my results.
I started with a PNG, and converted it to PBM and PGM. I got much better quality doing this conversion with GIMP, as opposed to pngtopnm.
I traced both formats with autotrace and potrace, which I output to SVG.
Autotrace accepts PNG, so I did the trace with the original as well.
I got the highest quality with PGM and potrace.  It also was the smallest file size.
a close second was PBM with potrace, slightly larger.
third was autotrace and the PBM, larger still.
Using the PGM with autotrace was unacceptable, and the file size was HUGE!
So if black/white is OK: Convert PNG to PGM with GIMP, then potrace
both the best quality, and smallest size SVG.  This is assuming you started with anti-aliased black/white line-art, i guess the full greyscale PGM avoids the aliasing of PBM.
It seems autotrace is the way to go, if your forced to deal with multiple colors. 
I suspect you will need to do many passes and really tweak those command options,
The PNG directly to autotrace was a complete disaster, but i suspect it would improve given enough time to configure command arguments.
However, even with those perfect options I would believe potrace yields a cleaner trace.

Similar Messages

  • Converting PNG images to Jpeg

    I am operating with iPhoto 6.0.6 and have a lot of recent wedding photos that were sent to me in PNG format. How do I convert these images to jpeg? I've found lots of shareware for conversion but nothing that will run on a mac.

    Is there any reason to convert them? PNG is just as portable as JPEG.
    You can export png from iPhoto and choose JPEG as the destination format using the File -> Export command.
    Regards
    TD

  • How to convert PNG image to Vertor Image to make font on Mac

    Hi Mac People,
    I like to create a set of font, and I have made them in a image editing tool, I have FontForge downloaded but decide to use it to convert instead direct design them inside.
    So now I don't know how to convert the PNG image to vector image required by the FontForge, I read some post mentioned Ubuntu has utilities to convert, but I'm not sure OS X has that function too.
    Could anyone let me know how to convert PNG so I can create my fonts?
    If PNG can't, the software can export TIFF or jpeg or similar.
    Please help me, I need make them this few day.
    Thanks everyone for giving me a hand!

    take a look at:
    http://developers.sun.com/techtopics/mobility/midp/articles/picture/

  • [SOLVED] python problem convert YUV422 images to jpgs

    I hope this is not off topic - but I'm trying this running arch linux, so it is somewhat arch related...
    I have some YUV422 images and want to convert them to jpgs. I've found this pyhthon script which should do the job.
    https://bitbucket.org/hudson/magic-lant … 422-jpg.py
    But I guess i am doing something wrong.
    It starts with: I don't know with which python command I can run the script.
    $ python 422-jpg.py .
    File "422-jpg.py", line 54
    print "Wrong number of subpictures (%d)" % numpics
    ^
    SyntaxError: invalid syntax
    $ python2 422-jpg.py .
    Traceback (most recent call last):
    File "422-jpg.py", line 10, in <module>
    import numpy
    ImportError: No module named numpy
    $ python3 422-jpg.py .
    File "422-jpg.py", line 54
    print "Wrong number of subpictures (%d)" % numpics
    ^
    SyntaxError: invalid syntax
    most promising seemes to me the python2 command. But I don't understand the numpy problem. I know the script uses pythons image libraries but actually I installed them:
    pacman -Suy python-numpy
    pacman -Suy python2-imaging
    or does the script just not find the libs?
    I'm a bit stuck here for I don't know python very well.
    Thanks in advance
    (BTW I need this because I extended my cameras firmware with magiclantern to create time lapse movies, but disabling the mirror mechnism automatically leads to *442 images instead of jpgs - sigh)
    Last edited by keen90 (2013-05-29 16:57:36)

    Hi
    I think it's simply missing numpy for python2.
    It's: extra/python2-numpy
    Greez
    Edit: Alternatively imagemagick could probably do the job.
    Last edited by rebootl (2013-05-28 18:09:26)

  • Problem Converting Keynote Quicktime to WMV with Flip4Mac

    HI All
    I can see that perhaps one other person may have had this issue. I have a continuous presentation exported from Ketnote as a Quicktime Movie. This plays from end to end without a hitch.
    I am using Flip4Mac to convert to WMV, something I have done on many occasions with other QT files without issue (not from Keynote)
    The resulting file only exports to the first transition in the Keynote presentation.
    I have made the quicktime continuous (so it does not stop at slide changes) I have tried un-checking the sprite track option.
    Pretty much every combination but it still always only exports to the first transition.
    Any clues ? What am I missing ?
    Thanks for your help

    Hi
    yes it does however I have been messing around over the weekend and have got some of the way to solving this.
    Sorry its a bit long and convoluted but here goes.
    I extracted the video and audio tracks as suggested below and made a new flattened movie.
    I then found a utility to remove all the chapter markers from Ecamm Network.
    This removed every chapter (slide) marker.
    I then re-saved and made a WMV from that file. It exported until the last transition and stopped !! ( I checked with the orig file)
    So I then converted the end section to WMV and joined the 2 WMV files together in Quicktime Pro.
    This then played happily from end to end.
    BUT you cant then save that as a WMV ! Quicktime exports it again as a .mov
    So I thought that .mov must work if I convert that to wmv but no, stops in the exact same place.
    There is no sprite track no chapters but there must be some other metadata that is upsetting Flip4Mac
    Anyway closer than I was.
    Cant import to FCP or use DV as despite setting the frame rate to 25 in Keynote it actually exports at 22 so any 'video' frame rates make the animation very jerky as you would expect.
    thanks for you help though everyone
    Neil

  • Problem when displaying images when working  with PHP, mysql and dreamweaver in a brower

    Hey Guys
    I am new to dynamic development but I already did some
    research and tutorials about how to get a dynamic web site working
    with PHP and Mysql in Dreamweaver. I set up a test page to view
    some content on it directly from the mysql database and it worked
    just fine in dreamweaver only when I pressed the
    live data view.
    When I tried to view the same page using the browser preview
    with firefox and internet explorer, plain text from the database
    was correctly displayed on the brower but the images were absent.
    In the mysql database I used the varchar as my picture data
    type field so that I will refer in dreamweaver in the data binding
    panel in the img.src to the picture column of my database.
    I anyone can tell me what am I doing wrong so that my
    pictures are not displayed in the browser when i click the browser
    preview facility in dreamweaver I would be very very and very
    pleased ! :)

    The odds are that it is the way that you have referenced the
    images rather
    than an issue with the database. If you have the images root
    relative like
    this "/images" then they will work in preview, and on the
    webserver, but
    will not view when looking at the file via localhost.
    If possible make the links page relative and then they should
    work fine.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "mariosal026" <[email protected]> wrote in
    message
    news:ea3nq2$9ol$[email protected]..
    > Hey Guys
    >
    > I am new to dynamic development but I already did some
    research and
    > tutorials
    > about how to get a dynamic web site working with PHP and
    Mysql in
    > Dreamweaver.
    > I set up a test page to view some content on it directly
    from the mysql
    > database and it worked just fine in dreamweaver only
    when I pressed the
    >
    live
    > data view.
    >
    > When I tried to view the same page using the browser
    preview with firefox
    > and
    > internet explorer, plain text from the database was
    correctly displayed on
    > the
    > brower but the images were absent.
    >
    > In the mysql database I used the varchar as my picture
    data type field so
    > that
    > I will refer in dreamweaver in the data binding panel in
    the img.src to
    > the
    > picture column of my database.
    >
    > I anyone can tell me what am I doing wrong so that my
    pictures are not
    > displayed in the browser when i click the browser
    preview facility in
    > dreamweaver I would be very very and very pleased ! :)
    >

  • Problem with CFimage / PNG images

    I have a problem saving PNG images from another server, for example itunes, some work, some don't
    The following image will open fine in my browser ->
    http://a576.phobos.apple.com/us/r30/Purple/v4/de/60/bb/de60bb7f-8995-4007-cfec-1b0a472fa36 7/icon.png
    This is the error I am receiving:
    An exception occurred while trying to read the image.
    javax.imageio.IIOException: Error reading PNG metadata
    Code:
    <cfimage source="http://a576.phobos.apple.com/us/r30/Purple/v4/de/60/bb/de60bb7f-8995-4007-cfec-1b0a472fa36 7/icon.png" overwrite="true"  destination="#filepath#/9999.png"
        action = "write">
    I believe some images have malformed/incorrect headers. I'm guessing this is a CF issue (I use CF8), because it loads fine in a browser.
    Anybody have a solution to this? Maybe an alternative way to retrieve the image? Custom tag?
    Thanks
    Mark

    I found the issue and solution. The problem was with the Java, the JVM had issues reading SOME PNG's from servers, but not all, there must be a newer way of encoding them that was not around when the version of java I had was created, or it's just a bug. I had an earlier version of 1.6 which is downloaded as version SE 6 from Oracle.
    As per some instructions by Ben Forta I tried an update of the JVM to version 7 (1.7.x),
    http://forta.com/blog/index.cfm/2013/3/3/Upgrading-ColdFusion-To-Java-7
    The update worked on my local dev machine which was CF8 with Win 7 64bit, and it actually fixed the CFIMAGE issue!
    However, when I did the same update, with the same java file on the same version of CF8, CF would no longer restart throwing an error that it could not find a file.
    Luckily I had a backup of the config file because I could not switch settings back any other way if CF would not start the administrator (Java also makes a .BAK anyway)
    I tried the first build of version 7, same problem, so I went to the very last version 6, build 45, it installed, and it also fixed the CFIMAGE crash!
    A couple of points for anybody else trying this
    Make sure you have a back up the config, in CF8 it's located here (different to the location in Bens instructions)
    Coldfusion8\runtime\bin\jvm.config
    Also note that the forward and backward slashes are different for the built in JVM that ships with CF and is set in the administrator, and the location you will specify
    Original location: C:/ColdFusion8/runtime/jre
    New location: C:\Program Files\Java\jre7\
    Here is the location to the Java file (
    Java SE Runtime Environment 6u45)
    Java Archive Downloads - Java SE 6
    Took me days to get to the bottom of this, but the fix actually takes just a few simple steps and a few minutes, of course
    Mark

  • Anything out there to batch convert png to svg

    Hi there
    I really like the move towards SVG but the thought of running each and every icon through a program is daunting - is there any program out there that would bath convert PNG files to SVG while retaining their dimensions - i guess there probably isn't but it doesn't harm to ask.
    Cheers

    I'm sure there is other software for what you are looking for. This is the reason I asked what is your current device so I can see what I can find out for you. I did a google seach and found this results
    http://www.google.com/search?hl=en&rlz=1C1CHMI_enUS302US342&q="City+Guides"+software+for+palm+TX&aq=...
    This might not be exactly what you wanted but there is software still out there for it.

  • Changing .PNG Images

    I just got my MacBook yesterday and I have been trying to change my application icons but have run into a problem: all .PNG images have the same default image (the one with the piece of paper behind a photo that simply says "PNG") Every time I click on the .PNG and go to "Get Info" the small image on the top is the default icon, so when I copy it and paste where I want to replace another icon it always ends up being the default "PNG" icon.
    Is there an easy way to show the actual .PNG I downloaded rather than the default one?
    Any help appreciated.

    When you download images from the internet, they do not have an icon. There is no way to automatically give them an icon either. Well, there is with a "Folder Action" but that is a pretty geeky solution.
    They COULD have the icon of your default PNG viewing application, but apparently it is not set in your OSX. Right-click on the icon and get the infowindow. Chick the "Open With" button and navigate to Preview.app. Now click the "Change All" button. That makes all PNGs have the review icon and when doubleclicked they will open in Preview.
    If you want more graphic manipulation features you should use a dedicated app like GraphicConverter: http://lemkesoft.de/

  • Converting tiff images into jpeg

    I would like to convert tiff images into jpegs with iphoto. I dont want to duplicate all my photos and then have to delete one by one!
    How do I do this?

    Welcome to the Apple Discussions. The short answer is that you cannot. You will have to export the files via the File->Export->File Export menu option, selecting jpeg as the format and checking the box to include the keywords and comments, and maximum size. Then import the jpgs and delete the tiffs.
    You can get all of the tiff files together by doing a search for .tif. Then do a Select All (Command-A) and go to the export menu. Export all to a folder on the desktop. Import the new jpgs into iPhoto.
    To get rid of the tiffs once the jpgs are imported do another search for the tifs and select all again. Then type Command+Delete. That moves the tiff photos to iPhoto's Trash bin. Then empty the bin.
    If you have multiple files with the same file name you'll have to do some renaming before the export. You can batch rename them using the option Title to Date/Time or just date alone. I use the date taken as the file name as that gives me excellent chronological sorting and searching by filename for dates.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How to convert raster images like( PNG, JPG,GIF, BMP, TIFF etc) into SVG

    Hi Friends!
    With a hope that any Java Guru from SUN Forum can help me to solve my query, I'm posting my thread here.
    I have a project with feature to add image. My requirement is to convert any selected image file like (PNG,JPG,BMP,Tiff) into SVG Formate before adding it to Frame.
    I found one software from the link :
    http://delineate.sourceforge.net/
    Which covert raster to SVG.
    But I don't how can i use it runtime ?
    I want to convert during runtime process. like when user select option for to add Image then it call a procedure to add Image by converting any raster to svg & finally add to Frame.
    Your any help/suggestions wold be appreciated
    Regards
    Kirti

    There are basically two approaches:
    1. Embed the raster image in the SVG
    2. Vectorize the image
    1. Use Batik, or just write the XML yourself. Create some SVG files with embedded images, the syntax isn't to difficult. You could do it with a PrintWriter.
    2. Good luck to you. Writing a good vectorizer is
    - difficult
    - often pointless
    - though a great challenge if you're in to it
    The appllication you mention actually is only a front-end. it doesn't execute the vectorization itself. It uses Potrace and autotrace, which are native applications.

  • Trouble converting powerpoint files with png images to pdf-Can someone help?

    Hello all,
    In my line of work, I create and modify large sized posters that are created in powerpoint. I would have the files print ready by converting them to pdf. I usually have little to no issues executing this. However, I have been dealing with an issue of converting ppt files with png images. The size of the ppt is typically a 42x56 file. The several ways to convert to pdf produces an error each time. Png images are very useful as they provide much clarity vs jpegs or tiffs. The 3 ways I have tried below are:
    A) File>Print>Adobe PDF>High Quality print settings/300dpi results to an error message that says:
         "Windows cannot print due to a problem with the current print setup. Try one of the following:
         *Check the printer by printing a test page from Windows.
         *Make sure the printer is turned on and online.
         *Reinstall the printer driver"
         A blank pdf opens up (Selected to open file after publishing)
    B) File>Save as> Change file type as a pdf results in nothing happening. No pdf is produced.
    C) Acrobat>Create PDF results to an error message that says: "An unexpected error occured. PDFMaker was unable to produce the Adobe PDF."
    Again, this all happens with ppt files with png images. I took out the png images and attempted to convert to pdf, and the pdf is produced! 
    Can anyone provide any assistance in creating pdfs with png images or what settings I need to adjust? I am able to covert every other image type (jpeg, tiff, bmp), except for png images.
    I am using Microsoft Office 2010 with Adobe Acrobat X on Windows 7 (This happened on Windows XP as well).

    >I have a 48 slide presentation that has a small .png image in the "slide
    >master" so it will show up on every page.
    PowerPoint only has to store one instance of the image even thought it is
    displayed on multiple slides. But Acrobat can't do the same, the image has
    to be stored for every page that it appears on, so that would explain the
    larger file size.
    Acrobat is supposed to be able to optimize the storage of common background
    images (at least that's the message I see when I do a "Save as..."), but I
    have yet to see it to work. Maybe it depends on the application the orginal
    file is created in and the PDF conversion method used.
    Adding the image into a PDF file later as a watermark instead may be a way
    to keep the size down (then it really only does store the object once),
    though I believe that watermark images will appear in front of everything
    else on the page (not sure if that's a problem for you, it depends on
    whether any text or objects in the presentation ever appear in front of the
    image).
    What are the dimensions and resolution of the image in PowerPoint? You may
    be able to go as low as 75 dpi and not notice a difference, it depends on
    whether the image contains any areas of high contrast or text.

  • Use SVGAnimator to display a SVG with xlink PNG image

    I tried the M2GDemo and it works without this image part
    SVGAnimator animator =
    SVGAnimator.createAnimator( image );
    // add our custom event listener
    animator.setSVGEventListener(
    new CustomEventListener( image, animator ) );
    // get the Canvas for this player: requires a cast
    Canvas canvas = (Canvas) animator.getTargetComponent();
    I modify the requestResource a bit to get Image from root1.
    public void requestResource(ScalableImage inImage, String inURI)
         int pos = inURI.indexOf(":");
         if (pos >0){
              inURI = inURI.substring(pos);
         inURI = "file:///root1/"+inURI;
    try
    Connector.openInputStream(inURI);
    catch ( IOException ioe )
    ioe.printStackTrace();
    <image x='90.0' y='69.46001' width='222.7' height='152.25' xlink:href='myImage.png'/>
    Now I stuck with the error below.
    Using Pisces Renderer (native version)
    loadStarting : true
    loadComplete : true
    loadingFailed: false
    loadStarting : true
    loadComplete : true
    loadingFailed: falsejava.lang.ArrayIndexOutOfBoundsException
         at com.sun.perseus.model.Text.applyXMLSpaceDefault(+86)
         at com.sun.perseus.model.Text.applyXMLSpace(+37)
         at com.sun.perseus.model.Text.layoutText(+70)
         at com.sun.perseus.model.Text.checkLayout(+13)
         at com.sun.perseus.model.Text.paint(+12)
         at com.sun.perseus.model.ModelNode.paint(+9)
         at com.sun.perseus.model.StructureNode.paint(+16)
         at com.sun.perseus.model.ModelNode.paint(+9)
         at com.sun.perseus.model.StructureNode.paint(+16)
         at com.sun.perseus.model.ModelNode.paint(+9)
         at com.sun.perseus.model.DocumentNode.paint(+16)
         at com.sun.perseus.model.SimpleCanvasManager.fullPaint(+108)
         at com.sun.perseus.model.SimpleCanvasManager.updateCanvas(+18)
         at com.sun.perseus.midp.SVGCanvas$1.run(+87)
         at com.sun.perseus.util.RunnableQueue.run(+271)
    RunnableQueue terminatingUncaught exception java/lang/ArrayIndexOutOfBoundsException.
    Bascially all I need is a viewer to display SVG with xlink to PNG image without the use or tinyline. If I want to get the PNG image from http, what should I do?
    Any response will be greatly appreciated.

    > This technique is really just using a BEE, there is
    > documentation on the BEE concept in the online help
    > and Brian McKellar has a weblog on the subject as
    > well.
    OK, I think I get the idea. Will check the stuff. Thanks.
    > Notice the strange D at the end of the line. This
    > isn't in the original posting. Perhaps this is just
    > bad cut and paste.
    Just bad copy paste. Yes.
    > You say that this isn't working for you - but you
    > don't describe the results. Is there an error?  Does
    > it render anything in the button at all?  Does the
    > raw HTML get rendered?
    I just saw coding in the button.
    > You want to make sure that the
    > text doesn't get encoded - which would cause the HTML
    > source to display instead. On the htmlb:button you
    > will want to set the attribute encode = FALSE.
    OK, that was right on spot. This shows me the Icon! Strike!
    > Also I am not sure that you can also pass in text
    > with the image like that.  You might have to create a
    > full BEE and add the image and a textView separately
    > into the BEE.  Then render the entire BEE to a string.
    I'll check the documentation on BEE and give it a try.
    Thanks for your answer.
    Thats a starting point for me.
    Alf

  • I have a problem with loading the PNG image

    I have a problem with loading the PNG image from site. For ex. go to icefilms com and is starts to load png like crazy CPU is huge and you can not shut down Firefox at least a minute. This is not just in this site but whit any one whit lots of pictures.
    Image from firefox: Picture [http://img836.imageshack.us/img836/9910/7312011103147pm.jpg 1] [http://img28.imageshack.us/img28/8505/7312011103249pm.jpg 2] [http://img706.imageshack.us/img706/5615/7312011103348pm.jpg 3 ][http://img827.imageshack.us/img827/8483/7312011103533pm.jpg 4]
    This is my Task Manager [http://img217.imageshack.us/img217/5715/7312011103621pm.jpg 1]
    - I try safe mode, same thing
    -All addons and plugins are ok
    Any idea why is this so big problem.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • Problem with reduction Of an PNG Image with transparent background

    I have an PNG Image on my computer with a transparent background that I would like to reduce 50% and save it back to my computer can you tell me how to achive this?

    Are you looking to reduce the size (pixel dimensions) by 50% or reduce the file size by 50%?
    If you want to reduce the actual image size (pixel dimensions) you could go to Image>Image Size
    and check resample image with constrain proportions and then enter 50 in the pixel dimensions at the top after setting
    the drop-down to percent.
    Or use file Save for Web and enter 50 under the percent under image size.
    As far as saving you could use File>Save As in photoshop and choose png or File>Save for Web>png
    (save for web usually results in smaller file sizes)

Maybe you are looking for

  • Dynamic modification at characteristic level

    Hi Experts, Advance thanks. I am implementing QM for a client. There are two characterisitcs to be inspected in a part number received from a vendor. I wish to record first inspection characterisctic only one time per month for SPC purpose and anothe

  • 1210 printer problem

    I have a 1210 printer, uses 56, 57 cartridges.  When I printed photos I got a line down the middle of the pix.  I cleaned inside of printer, bought new cartridges at cost of almost $60.  Now I still get the line down the middle of the printed pix.  D

  • List to PDF

    Hi.., How to convert the list output (either the normal list or ALV output ) to PDF format ?? what are the function modules we use to get the spool request and to submit the program to background ?? its urgent..

  • TNAPR vs NACE

    Folks, what is the relation between these two? If we find an output type,driver prog and std script in TNAPR,does the same shud exist in NACE also? In my issue there is an output type like that, which does exist in TNAPR and not in NACE...is that pos

  • How to order free CD's?

    Hello, i'm from the Salvador, sorry by my english level. In the past I received some free CD's from Oracle, the aplication server 9i, but i lost them, and I want to know how can i do to get another free CD's, because i can't found the link to order t