BMP TO svg ONE LINE : – convert -magnify %1 pgm: | mkbitmap -x -f 50 -t 0.48 | potrace -s -t 5 > %1.svg

BMP TO svg ONE LINE : – convert -magnify %1 pgm: | mkbitmap -x -f 50 -t 0.48 | potrace -s -t 5 > %1.svg

 

 

oncol3.gif (Large)

 

oncol3

==========================

GOT IT – USE FFMPEG TO CONVERT SVG TO PNG!!

\ffmpeg\ffmpeg -width 560 -height 960 -i tantrum-0001.svg tantrum.png

Uses: https://opensourcepack.blogspot.com/2017/12/ffmpeg-for-windows-xp.html

—–
NOW add missing white background:  (this overwrites transparent PNG so backup transparent PNG first)
mogrify -format png -flatten -background white *.png

===================================

LOSSLESS!!!
ffmpeg -r 30 -f image2 -s 560×998 -i tantrum-%04d.png -i \Users\Kenny\Music\viral-tantrum.mp3 -c:v ffv1 -level 3 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 -c:a copy vector_ffv1.mkv

WOW- ITS FAST

=========

Now going for really small file size:  – notice high crf but it’s ok as it’s only 1-bit depth!
\ffmpeg\ffmpeg -i vector_ffv1-2.mkv -vcodec libx264 -vf format=gray -pix_fmt yuv420p -crf 40 vector_ffv1-2.mp4

===========================

WORKS!!
uploading to Youtube.

https://www.youtube.com/watch?v=b0oyKJYOsVU&feature=youtu.be

=======

Don’t Watch – First successful BMP2SVG2BMP 28X48 1-bit depth boy meltdown car vector. I wondered: How much information can be lost while retaining what’s important for information? Important in computer vision, neural nets, object discrimination. 28×48 is tiny and yet, it was possible to keep enough important information to convey even facial expressions.

=============================

Now going back to simplify SVG paths Using:

for %n in (*.svg) do inkscape –file=”%n” –verb=EditSelectAll –verb=SelectionSimplify –verb=FileSave –verb=FileClose

with backup SVGs.

===

“C:\Program Files\Inkscape\Inkscape” –file=tantrum-0001.svg –verb=EditSelectAll –verb=SelectionSimplify –verb=FileSave –verb=FileQuit

=====
Double simplify

“C:\Program Files\Inkscape\Inkscape” –file=tantrum-5377.svg –verb=EditSelectAll –verb=SelectionSimplify –verb=EditSelectAll –verb=SelectionSimplify –verb=FileSave –verb=FileQuit

=======================

vector-tantrum-short

——————–

“How much info can be lost while keeping max info?” Why did I pick a dumb video for my BMP to SVG testing? (don’t look at my Youtube)? So, this is the latest: Inkscape double path simplification (vector simplifying) via batch in a short GIF.

====

 

 

Attachments

Leave a comment

Your email address will not be published. Required fields are marked *


six − = 2

Leave a Reply