Image conversion guides

Verify SVG shapes and transparency on a PNG marker

·

A route map uses a tiny transparent marker. Convert it into editable SVG geometry so an illustrator can change its colors without repainting the source image.

PNG to SVG

Convert the 8 × 6 route marker into three rectangles

Select Load example. The workspace uses Editable rectangles and displays the PNG and SVG side by side. The SVG has three shapes and an 8 × 6 viewport.

The gold band is 6 pixels wide and 2 pixels high. Two 2 × 2 blocks sit below, with an empty gap between them. The blue block uses partial opacity, so the checker pattern shows through.

W3C SVG 2 basic shapesW3C PNG Specification

Inspect the downloaded rectangle and path elements

Download route-marker.svg and open it in a text or vector editor. The SVG contains three rect elements. The gold band starts at x=1, y=1 and has width 6 and height 2. SVG expresses the blue block’s transparency using fill-opacity.

Choose Group shapes by color and opacity and convert again. The file uses path elements instead of separate rect elements. Each path can group disconnected regions that use the same fill and alpha.

W3C SVG 2 basic shapes

Use embedding when you need the original PNG bytes

Choose Embed original PNG and convert the example again. In the SVG source one image element contains the PNG encoded as data. The viewport still measures 8 × 6.

Choose this mode for a detailed PNG that would exceed the shape limit or when its original bit depth and metadata matter. The result is a raster image inside an SVG file. Export a static frame first if you are starting from an animated PNG.

W3C SVG 2 embedded contentW3C PNG Specification

Common questions

Why does the marker have no background rectangle?

The shape modes omit fully transparent pixels. The checkerboard is a preview background and is absent from the SVG.

Will the shapes smooth the marker into curves?

The shapes preserve the decoded pixel grid. Use a vector editor if you need to redraw the edges as curves.

Sources

Put it into practice.

Related guides