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
Convert pixels to rectangles in a vector format
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert pixels to rectangles in a vector format
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/
see
http://www.imagemagick.org/Usage/draw/
http://www.w3.org/TR/SVG/
Re: Convert pixels to rectangles in a vector format
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
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert pixels to rectangles in a vector format
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.
convert smallimage -scale 1000% largeimage
this will scale by a factor of 10.
Re: Convert pixels to rectangles in a vector format
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.