Page 1 of 1
Convert pixels to rectangles in a vector format
Posted: 2010-02-03T06:08:16-07:00
by lynx_abraxas
Hello!
I'm looking for a tool that can convert a simple bitmap (of small size) to a vector graphic (eg svg) by simply creating a filled square for each pixel. Can this be done with IM or another tool? I'd need this to visualize in "high zoom" the selected pixel with a thin path and how some filter changes these.
Thanks for any help or hint on this.
Lynx
Re: Convert pixels to rectangles in a vector format
Posted: 2010-02-03T10:22:51-07:00
by fmw42
i am not an expert on this, but IM can convert digital images into svg format using the RSVG delegate library.
see
http://www.imagemagick.org/Usage/draw/
http://www.w3.org/TR/SVG/
Re: Convert pixels to rectangles in a vector format
Posted: 2010-02-03T10:39:25-07:00
by magick
The RSVG delegate library is required to read an SVG file. Recent versions of ImageMagick can write SVG images like this:
- convert image.jpg image.svg
Re: Convert pixels to rectangles in a vector format
Posted: 2010-02-03T11:47:49-07:00
by lynx_abraxas
Thanks for the answers but I'm looking for a conversion without a fancy path tracing. In contrast to most cases I want to keep the pixly appearance of a very low resolution bitmap.
Re: Convert pixels to rectangles in a vector format
Posted: 2010-02-03T11:58:12-07:00
by fmw42
why not just zoom the image using -scale, which will pixel replicate without interpolating.
convert smallimage -scale 1000% largeimage
this will scale by a factor of 10.
Re: Convert pixels to rectangles in a vector format
Posted: 2010-02-03T12:17:42-07:00
by lynx_abraxas
The images are ment to go into latex and at the moment I don't know what final zoom will be needed. Also this bloats the imige up a lot since I need around 10x the original size.