New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Completely wrong" -input-format handling #5
Comments
Can reproduce this with 0.40.0 on ubuntu 18.04:
Specifying a different or invalid input format does not help for me. |
I'm using tga format |
I am also having format issues on Funtoo x86_64, autotrace 0.40.0.
-- Sadly this makes the program pretty useless -- can't process PNG at all. I also tried building autotrace-0.31.1(from debian sources) on this same Funtoo Linux, it gives the same error; so I suspect it's an issue with the input PNG format, or an auxilliary library has made a breaking change, and upon which autotrace depends. The PNG was created using ImageMagick 7; could this also be a source of incompatibility (ie., IM7 putting PNG stuff in that autotrace or libpng doesn't understand?) I have an old install of IM6.9 and autotrace-0.31.1 on Cygwin64 elsewhere, and it can understand the PNGs from ImageMagick 6.9 (though, as reported above, one has to give -input-format=WTF or other invalid format to get it to work). [Cygwin64 autotrace-0.31.1]
[Funtoo Linux x64, autotrace-0.40.0] |
UPDATE: I have tested building branch Martin_Weber_input_png_15 and this now does accept '-input-format png' properly, and appears to output PDF and DXF formats for me properly. I had to build suing ./configure --without-magick, due to compile issues, even with ImageMagick-6.9. Suggest prioritizing merge of this branch to fix PNG input handling, but the issues with ImageMagick remain. |
Also get an
I haven't dug into what's causing it yet. Going to try Edit: And this BMP file also doesn't work (produced with |
@josephrocca "char.bmp" has a negative height, which means, that the first pixel is the top left pixel (otherwise, BMPs always start with a bottom left pixel). This little part of the spec is often ignored, as such BMPs are quite rare :) "char2.bmp" has a header of 124 Bytes (BITMAPV5HEADER), instead of more common 40 bytes. It also has a compression==3 instead of more common compression=0 (as it contains transparency). Also, when you open "char2.bmp" in Photoshop, the transparency is ignored. So far, it looks like no program accepts BMPs with transparency. I strongly suggest not to store images in BMP nowadays and convert them to PNG as soon as possible :D |
Thanks for the insights, photopea! I managed to get the
And it works for PNGs, but the centerlines it produces are not centerlines at all:
Perhaps this has to do with excluding imagemagick? I have no idea :S If I end up working it out I'll post here. |
Hi, I just noticed this library is about tracing bitmaps to vector graphics. This feature is present in Photopea and is better than many commercial tracers: https://blog.photopea.com/vectorize-bitmaps-in-photopea.html |
@photopea Very cool! It looks like it doesn't support centerline/midline tracing though? And fair enough because it's not a very common need. I'm specifically trying to turn glyphs like "G", above, into centerline traces rather than outlines. Also, I need to be able to do it programmatically (hundreds of thousands of images). We're probably heading off-topic now though. But, as I said in my email - thanks for the excellent tool! |
For anyone interested: I gave up on this version of autotrace and have been happy with potrace: potrace 1.15. Copyright (C) 2001-2017 Peter Selinger. Possible input file formats are: pnm (pbm, pgm, ppm), bmp. .. unsure where the definitive upstream is, as there are a ton of forks on github, but the above is the version info from my Funtoo installation. It handled BMP input to PDF and DXF for me much better than current versions of autotrace. |
This worked for me, on OSX, I was able to build without issue using the instructions from INSTALL_OSX.md. autotrace -output-file foo.svg -centerline drunkenbooboobear.png It did a pretty good job! |
…ling Closes issue autotrace#5. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
…ling Closes issue autotrace#5. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
(i hope i'm in the right bug db...)
autotrace's handling of -input-format seems to be completely hosed. As input i have a PNG file:
So i convert the png to bmp and try that:
But... while testing that i accidentally mis-typed BMP as BPM and i accidentally fed it a PNG file, and it worked:
No error, despite the BPM typo, and it generates the expected SVG output. That also works if i replace x.png with x.bmp, but only if i feed it an illegal -input-format type.
If i remove -input-format, it behaves just like it does with PNG:
The only option which works for me is to feed it an invalid -input-format type:
autotrace -output-file x.svg -input-format WTF -dpi 300 -color-count 16 x.png
WTF indeed. Locally supported formats:
The text was updated successfully, but these errors were encountered: