- RGBA ImageData check in colorquantization(), solving Issue #24 and #18
options.layering
: default 0 = sequential, new method ; 1 = parallel, old method. (Enhancement Issue #17)- case insensitive option preset names
- README.md reorganizing
- Node.js Command line interface (Enhancement Issue #13)
- FIXED: Pathomit problem thanks to EusthEnoptEron (Issue #14)
- options.corsenabled for CORS Image loading thanks to neel-radica (Issue #12)
- FIXED: missing hole in path because of incorrect bounding box (Issue #11)
- Posterized3 option preset
- Changed svgpathstring() arguments to simplify getsvgstring()
- FIXED: Gaussian blur preprocessing is now independent of DOM and canvas, thus working directly with Node.js (Issue #9)
This is a major update, changing some internal logic and option default values. The API is compatible, so it should work out of the box.
- FIXED: transparent holes are now possible. ( Issue #7 and #8 )
- Deterministic output by default:
options.colorsampling = 2
;options.mincolorratio = 0
are deterministic and the defaults now. - Right angle enhancing:
options.rightangleenhance
( default : true ) - Option presets (see below)
- Custom strokewidth with
options.strokewidth
( default : 1 ) - Line filter with
options.linefilter
( default : false ) - Simplified
getsvgstring()
;options.desc = false
by default; splitpoint = fitpoint in fitseq(); small bugfixes and optimizations
Version history and README for the old 1.1.2 version is here.
- minor bugfixes
- lookup based
pathscan()
- Bugfix: CSS3 RGBA output in SVG was technically incorrect (however supported by major browsers), so this is changed. More info
- it works with Node.js (external library required to load image into an ImageData object)
- export as AMD module / Node module / browser or worker variable
- new syntax:
ImageTracer112.imageToTracedata()
, no need to initialize - fixed
options
with hasOwnProperty: 0 values are not replaced with defaults, fixed polygons with coordinates x=0 or y=0 - transparency support: alpha is not discarded now, it is given more weight in color quantization
- new
options.roundcoords
: rounding coordinates to a given decimal place. This can reduce SVG length significantly (>20%) with minor loss of precision. - new
options.desc
: setting this to false will turn off path descriptions, reducing SVG length. - new
options.viewbox
: setting this to true will use viewBox instead of exact width and height - new
options.colorsampling
: color quantization will sample the colors now by default, can be turned off. - new
options.blurradius
: setting this to 1..5 will preprocess the image with a selective Gaussian blur withoptions.blurdelta
treshold. This can filter noise and improve quality. imagedataToTracedata()
returns image width and height in tracedatagetsvgstring()
needs now onlytracedata
andoptions
as parameterscolorquantization()
needs now onlyimgd
andoptions
as parameters- background field is removed from the results of color quantization
- ESLint passed
- test automation and simple statistics in imagetracer_test_automation.html
- first published version + bugfixes