Page 1 of 1

Puppylogos as svg

Posted: Wed Jan 27, 2021 10:22 pm
by dellus
puppylogo_cut.png
puppylogo_cut.png (46.12 KiB) Viewed 2266 times

I would love to have this image as a svg file, so I can tweak it and adapt to different sizes. It's from an old Puppy, don't remember which.

tahrpup2.png
tahrpup2.png (42.86 KiB) Viewed 2266 times

Same for this one, from Tahr. I only need the left guy (I think so), my favourite.

Does anybody know where I can get that?


Re: Puppylogos as svg

Posted: Wed Jan 27, 2021 10:56 pm
by vovchik

Dear dellus,

Here is a tiny svg I made using potrace. I hope you can use it. Unpack the archive and you'll find the svg.

With kind regards,
vovchik


Re: Puppylogos as svg

Posted: Wed Jan 27, 2021 11:15 pm
by fredx181

Used online service here: https://onlineconvertfree.com/complete/png-svg/
Attached in tar.gz
EDIT: Also attached tahrpup2-left.svg.tar.gz

Fred


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 12:11 am
by vovchik

Dear Fred,

Thanks. I see that the online service just places an image wrapper around the original png after doing a base64 encoding of the binary data. This means that, while the svgs will scale up, there will be perceptible definition loss at higher magnifications, since none of the elements have actually been vectorized. That is the downside of binary embedding. The upside is that only height and width need adjustment in the svg tag for rescaling purposes, which is easy.

With kind regards,
vovchik


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 1:10 am
by dellus

Thanks for your answers and your engagement.
To be honest, I had hoped to get access to the original drawings. I suppose they were made as vector drawings, probably svg, from the beginning. Who has been the puppy artist? Still around? Somebody must have made them.
Maybe someone knows.


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 10:39 am
by fredx181
vovchik wrote: Thu Jan 28, 2021 12:11 am

Dear Fred,

Thanks. I see that the online service just places an image wrapper around the original png after doing a base64 encoding of the binary data. This means that, while the svgs will scale up, there will be perceptible definition loss at higher magnifications, since none of the elements have actually been vectorized. That is the downside of binary embedding. The upside is that only height and width need adjustment in the svg tag for rescaling purposes, which is easy.

With kind regards,
vovchik

ah... good to know, thanks vovchik !
EDIT: Do you know of a good way to convert png > svg ?
I've used ImageTracer https://github.com/jankovicsandras/imagetracerjs (java based program) but the quality is sometimes bad (distorted).

Fred


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 2:14 pm
by vovchik

Dear Fred,

I use potrace, but within a script, the most essential bit of which is:

Code: Select all

convert "$infile" -trim pnm:- | potrace -s -O 1 -u 1 -o "$newfile"

The command-line program "convert: is part of imagemagick. It will convert the png to pnm, which is piped into potrace. Potrace then outputs a standard text svg file. Mtpaint may be able to do that conversion from png to pnm, too.

Sometimes I have to massage the png first in a graphics editor - increasing contrast or doing a greyscale conversion before running my img2svg script.

With kind regards,
vovchik


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 2:21 pm
by mikeslr
vovchik wrote: Thu Jan 28, 2021 12:11 am

Dear Fred,

Thanks. I see that the online service just places an image wrapper around the original png after doing a base64 encoding of the binary data... vovchik

Reminded me of the discussion here, http://murga-linux.com/puppy/viewtopic. ... 2b7#978264 that resulted from my use of LibreOffice Draw to 'convert' a png to an svg.

jamesbond suggested, http://murga-linux.com/puppy/viewtopic. ... 2b7#978365 AutoTrace, http://autotrace.sourceforge.net/ as one possible tool.


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 8:56 pm
by step

@dellus, here's my try. These are vectors, like vovchik's, maybe you can use them.


Re: Puppylogos as svg

Posted: Thu Jan 28, 2021 10:20 pm
by fredx181
vovchik wrote:

I use potrace, but within a script, the most essential bit of which is:

Code: Select all

convert "$infile" -trim pnm:- | potrace -s -O 1 -u 1 -o "$newfile"

The command-line program "convert: is part of imagemagick. It will convert the png to pnm, which is piped into potrace. Potrace then outputs a standard text svg file. Mtpaint may be able to do that conversion from png to pnm, too.

Thanks, that works, but the result is not identical, has transparent background which is nice too, but is it possible this way that the svg looks exactly the same ?

Fred