New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments: Converting PNG to SVG #10

Open
eprev opened this Issue Dec 27, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@eprev
Owner

eprev commented Dec 27, 2016

This issue is reserved for comments on Converting PNG to SVG.

@eprev eprev added the comments label Dec 27, 2016

@mandarvaze

This comment has been minimized.

Show comment
Hide comment
@mandarvaze

mandarvaze Mar 27, 2018

I tried the same for JPG, and the resultant SVG looks huge when opened in the browser (firefox)
Even after Cmd+- (Zoom out - stops at 30%) I can't see the entire image in my screen.

I'm referring to this image if it matters.

command used :

convert -alpha remove timoy.jpg pgm: | mkbitmap -f 32 -t 0.4 - -o - | potrace --svg -o timoy.svg

I can't attach the generated SVG for your reference, since github does not support attaching SVG.

mandarvaze commented Mar 27, 2018

I tried the same for JPG, and the resultant SVG looks huge when opened in the browser (firefox)
Even after Cmd+- (Zoom out - stops at 30%) I can't see the entire image in my screen.

I'm referring to this image if it matters.

command used :

convert -alpha remove timoy.jpg pgm: | mkbitmap -f 32 -t 0.4 - -o - | potrace --svg -o timoy.svg

I can't attach the generated SVG for your reference, since github does not support attaching SVG.

@eprev

This comment has been minimized.

Show comment
Hide comment
@eprev

eprev Mar 28, 2018

Owner

You can play with --width argument (sets width in points, pt) of the potrace command:

convert -alpha remove timoy.jpg pgm: | mkbitmap -f 32 -t 0.4 - -o - | potrace --svg --width 10 -o timoy.svg

Or simple change width and height attributes of the generated SVG manually.

Owner

eprev commented Mar 28, 2018

You can play with --width argument (sets width in points, pt) of the potrace command:

convert -alpha remove timoy.jpg pgm: | mkbitmap -f 32 -t 0.4 - -o - | potrace --svg --width 10 -o timoy.svg

Or simple change width and height attributes of the generated SVG manually.

@mandarvaze

This comment has been minimized.

Show comment
Hide comment
@mandarvaze

mandarvaze Mar 28, 2018

Thanks, Works well.
10 was still a little too big for my laptop screen.5 or 6 worked well.
-r300 also worked to get "decent" sized image.

I tried the same command (without any extra params) on the sample PNG from your blog. The size of SVG is still bigger than PNG.

Does the "default" size of SVG (without specifying width or r) depend upon the original size of input file ? (PNG or JPG)

In my case, the original JPG itself are big, may be that is why SVG are HUGE (visual size wise)

mandarvaze commented Mar 28, 2018

Thanks, Works well.
10 was still a little too big for my laptop screen.5 or 6 worked well.
-r300 also worked to get "decent" sized image.

I tried the same command (without any extra params) on the sample PNG from your blog. The size of SVG is still bigger than PNG.

Does the "default" size of SVG (without specifying width or r) depend upon the original size of input file ? (PNG or JPG)

In my case, the original JPG itself are big, may be that is why SVG are HUGE (visual size wise)

@eprev

This comment has been minimized.

Show comment
Hide comment
@eprev

eprev Mar 28, 2018

Owner

I don't know how it calculates the default size, but I always set desired width and heigh in the generated SVG by editing it.

Owner

eprev commented Mar 28, 2018

I don't know how it calculates the default size, but I always set desired width and heigh in the generated SVG by editing it.

@mandarvaze

This comment has been minimized.

Show comment
Hide comment
@mandarvaze

mandarvaze Mar 28, 2018

Aha, Thanks.

mandarvaze commented Mar 28, 2018

Aha, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment