css-sprite
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -19,3 +19,3 @@ 'use strict'; | ||
module.exports = function (opt) { | ||
opt = lodash.extend({}, {name: 'sprite', format: 'png', margin: 4, processor: 'css', cssPath: '../images', orientation: 'vertical', sort: true}, opt); | ||
opt = lodash.extend({}, {name: 'sprite', format: 'png', margin: 4, processor: 'css', cssPath: '../images', orientation: 'vertical', sort: true, interpolation: 'grid'}, opt); | ||
opt.styleExtension = (opt.processor === 'stylus') ? 'styl' : opt.processor; | ||
@@ -89,3 +89,3 @@ var layoutOrientation = opt.orientation === 'vertical' ? 'top-down' : opt.orientation === 'horizontal' ? 'left-right' : 'binary-tree'; | ||
// tell lwip to use the 'grid' interpolation method when resizing - it makes the resized image look much better | ||
clone.resize(width, height, 'grid', function (err, image) { | ||
clone.resize(width, height, opt.interpolation, function (err, image) { | ||
cb(image); | ||
@@ -92,0 +92,0 @@ }); |
{ | ||
"name": "css-sprite", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"description": "css sprite generator", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -80,2 +80,3 @@ # css-sprite | ||
* **sort:** enable/disable sorting of layout [true] | ||
* **interpolation** Interpolation algorithm used when scaling retina images to standard definition. Possible values are `nearest-neighbor`,`moving-average`,`linear`,`grid`,`cubic`,`lanczos`. Defaults to `grid`. | ||
@@ -82,0 +83,0 @@ |
@@ -31,3 +31,4 @@ /* | ||
sort: true, | ||
opacity: 0 | ||
opacity: 0, | ||
interpolation: 'grid' | ||
}); | ||
@@ -34,0 +35,0 @@ |
93992
1071
266