Tracing a PNG

Post questions on how to use or achieve an effect in Inkscape.
prino
Posts: 6
Joined: Thu Feb 12, 2015 6:23 am
Location: Oostende, Belgium

Tracing a PNG

Postby prino » Thu Feb 12, 2015 6:46 am

ink.png
Original GIMP created PNG
ink.png (135 Bytes) Viewed 1890 times
OK, I've read https://inkscape.org/doc/tracing/tutorial-tracing.html and it seems to work, but where I would expect a (fairly) small .SVG file to be created which I would also be able to edit manually, I get a nearly 5K file for an original 135 byte PNG, with pretty incomprehensible paths. For what it's worth, what I'm trying to do is to recreate old-style green-zebra paper, I need if for some forms it having it in this format would allow me to even add the variable layout on it.

The attached files are the original 150x150px GIMP created PNG, and the Inkskape created .SVG.
Attachments
ink.svg
Inkscape bitmap trace of the PNG
(4.78 KiB) Downloaded 145 times

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Tracing a PNG

Postby v1nce » Thu Feb 12, 2015 7:10 am

your png is embedded in the svg so it adds a 135 *3/2 bytes to the size.
your svg is an inkscape flavored svg so there is a lot of extra information not really needed (use plain svg as export format to reduce the size)
png is compressed so to compare size it will be more equal to compress svg too.
tracing is an automated process that will produce good enough results for most uses.
But for what you want hand editing of svg would be infinitely superior.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Tracing a PNG

Postby v1nce » Thu Feb 12, 2015 7:50 am

here's 3 flavor of svg (between <svg ... /svg>) that encode for the "same" document

<svg width="150" height="150">
<defs>
<style type="text/css"><![CDATA[
rect {
stroke: none;
fill: #d6feef;
}
]]></style>
</defs>
<rect width="150" height="20" />
<rect width="150" height="20" y="30" />
<rect width="150" height="20" y="60" />
<rect width="150" height="20" y="90" />
<rect width="150" height="20" y="120" />
</svg>

<svg width="150" height="150">
<rect width="150" height="20" style="fill:#d6feef;stroke:none" />
<rect width="150" height="20" y="30" style="fill:#d6feef;stroke:none" />
<rect width="150" height="20" y="60" style="fill:#d6feef;stroke:none" />
<rect width="150" height="20" y="90" style="fill:#d6feef;stroke:none" />
<rect width="150" height="20" y="120" style="fill:#d6feef;stroke:none" />
</svg>

<svg width="150" height="150" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect id="rct" width="150" height="20" style="fill:#d6feef;stroke:none" />
<use xlink:href="#rct" y="30" />
<use xlink:href="#rct" y="60" />
<use xlink:href="#rct" y="90" />
<use xlink:href="#rct" y="120" />
</svg>

even when compressed it's hard for them to compte in size with your png (coz png is really optimized for compression of line of same color)

motifC.svg
(299 Bytes) Downloaded 137 times

motifB.svg
(418 Bytes) Downloaded 141 times

motifA.svg
(400 Bytes) Downloaded 141 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Tracing a PNG

Postby Lazur » Thu Feb 12, 2015 7:59 am

Another solution, made with one rectangle and a gradient fill.

ink v2.svg
(3.93 KiB) Downloaded 154 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Tracing a PNG

Postby tylerdurden » Thu Feb 12, 2015 8:11 am

Or a pattern fill?
Attachments
Greenbar1.svg
(9.06 KiB) Downloaded 147 times
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Tracing a PNG

Postby ragstian » Thu Feb 12, 2015 9:12 am

Hi.

This brings back fond memories - have gone through using pallets by pallets of the "stuff" in the "good-ol-days"!

Amazing how many different solutions to the same "problem"!

I follow the OP's spec's here: GimpForums
and created a "correct" 15.0" x 6.5" page with 67 green horizontal lines; :)
( The light green seen in the OP's spec is actually from the scanner software trying to anti-alias the lines,
originally all the lines were printed in the same green:)
Adding the perforated borders is an exercise left to the OP!
Fan-Fold_2.svg
(27.27 KiB) Downloaded 139 times

Good Luck.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Tracing a PNG

Postby tylerdurden » Thu Feb 12, 2015 9:59 am

I have a hard time thinking that there is greenbar paper with groups of lines only .049" tall. :?

Maybe the paper is 6.5W x 15" tall?
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Tracing a PNG

Postby ragstian » Thu Feb 12, 2015 10:31 am

Hi.
tylerdurden wrote:I have a hard time thinking that there is greenbar paper with groups of lines only .049" tall.

Thinking about it - so do I.

Maybe the Original Poster meant 8.5 instead of 6.5?

From Wikipedia
    Standard "green bar" page sizes included portrait-format pages of 8½ × 11 inches, usually printed at 80 columns by 66 lines (at 6 lines per inch) or 88 lines (at 8 LPI), and landscape-format pages of 14 × 11 inches, usually printed at 132 columns by 66 or 88 lines. Also common were landscape-format pages of 14 × 8½ inches, allowing for 132 columns by 66 lines (at 8 LPI) on a more compact page.

The number of green bars would then be 33.
Anyway - nice exercise!
Fan-Fold_3.svg
(22.45 KiB) Downloaded 137 times

RGDS
Ragnar
Last edited by ragstian on Thu Feb 12, 2015 11:15 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Tracing a PNG

Postby brynn » Thu Feb 12, 2015 11:09 am

My unquenchable curiosity leads me to ask, what was this kind of paper used for?

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Tracing a PNG

Postby ragstian » Thu Feb 12, 2015 11:40 am

Hi.
brynn wrote:My unquenchable curiosity leads me to ask, what was this kind of paper used for?

My "usage" was in "deep-water seismic" (oil exploration) where for every shot-point @25m intervals the printer would print a status for "everything".

It was normal to go through a box of paper per 25Km line. (every 2.5 hour). Later it was done the "correct way" printing only "abnormal status" - the total paper used was then only about a page or two per 25Km line - a huge saving in paper and not least shipping cost as the "data" (magnetic tapes - paper etc.) was shipped around the world for processing in specialized processing centers.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Tracing a PNG

Postby brynn » Thu Feb 12, 2015 12:49 pm

What was the purpose of the green stripes? Just tradition?

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Tracing a PNG

Postby ragstian » Thu Feb 12, 2015 1:56 pm

Hi.

The green stripes supposedly makes it easier to follow text on long lines.

See here;
Green stripe fanfold
Zebra Stripes

This type of paper is still produced and sold!

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

prino
Posts: 6
Joined: Thu Feb 12, 2015 6:23 am
Location: Oostende, Belgium

Re: Tracing a PNG

Postby prino » Thu Feb 12, 2015 9:28 pm

Thank you all! I will see which of the posted versions comes closest to my needs, and I might come back to ask for a bit more help on how to add the tables that I now pencil draw on it, if that is OK with you.

As for the light(er) parts of the zebra, they may have been the result of the scanner software, but I actually prefer them over the (probably) original solid stripes! And the holes? Not really interested in them as they would disappear anyway when I use a real 23-hole puncher.

The original paper has a size of 8 1/2 x 15 inch (yes, my 6 1/2" was wrong and has been corrected), the zebra-spacing is 1/8 inch and the zebra-lines have a length of 14 inch. And it really has 34 green lines and 33 white ones, see the attached PNG. Note that this was enhanced with GIMP to remove most of the sunlight-yellowed background, and compressed to 71% of the GIMP output with Ken Silverman's PNGOUT.

I know it's still sold, but I'm unlikely to need more than about 50-100 sheets in the coming years (read: probably rest of my life), so buying a whole box and shipping it to Belgium (cannot find it here) is extreme overkill. The actual forms I cut from it are always using the full 8 1/2" height, but one variety contains 5 small tables for a total width of 13.7 cm, the other contains a multiple of four columns (3/1.5/1.5/0.2 cm). For those interested, two images can be found on ftp://prino.selfip.org/, user "anonymous", no password required, look for t147-all.tif and t147-lift.tif. Note that the ftp site may disappear and reappear when my PC goes to sleep and wakes up again.

As to the why of using this paper? It seemed nice to use it at the time (1980) and my father had a steady supply of scrap from his workplace.
Attachments
fanfold-zebra-8.5x11.png
Scan of left edge of original fanfold paper
fanfold-zebra-8.5x11.png (227.07 KiB) Viewed 1764 times


Return to “Help with using Inkscape”