![]() Like the SVG, there is still a lot of whitespace here. inkscape -z -e hiero_A1_big.png hiero_A1.svg -w 980 The output size here is twice as large as the file we traced, just to leave plenty of pixels to work with. Use Inkscape to convert the SVG back to a large PNG. I couldn’t find a reliable way to programmatically crop the image back to its original padding as an SVG, but in my case I needed to convert it back to a bitmap anyway, so I cropped it later. The next steps will reproduce a smaller PNG with transparency and the correct padding. If you only want a vector, then you can stop here. It can be increased for a bolder, darker glyph, or reduced for a finer one. The k value affects the threshold operation. Here, we will produce an SVG so that we can make it transparent. The potrace program will threshold and trace the input image. This preparation is important, because a large blurry graymap will retain a lot more detail than the original image when a threshold is applied to convert it pure black and white: ![]() The 29×38 grey+alpha input becomes a blurry 490 x 580 greymap surrounded by whitespace. Padding by 10px on every side to reduce distortion around the edges.Ĭonvert hiero_A1.png -bordercolor white -border 10x10 \.These transformations make sure that the detail is preserved for tracing. ![]() The tracing program will convert the image to pure black & white as its first step.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |