grunt-responsive-images
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "grunt-responsive-images", | ||
"description": "Produce images at different sizes for responsive websites.", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://github.com/andismith/grunt-responsive-images", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -187,2 +187,10 @@ # grunt-responsive-images [](http://badge.fury.io/js/grunt-responsive-images) | ||
* **sample**<br /> | ||
*Type:* `Boolean`<br /> | ||
*Default:* false.`<br /> | ||
*Available Values:* `true` || `false`<br /> | ||
*Version:* 0.1.6 and above. | ||
Sometimes using 'sample' on PNGs may produce the same output with smaller filesizes, sometimes the output will be worse. Use this option to fine tune your images to use 'sample' instead of 'resize' where it is possible to do so. | ||
* **options.separator**<br /> | ||
@@ -219,2 +227,16 @@ *Type:* `String`<br /> | ||
* **options.customIn** | ||
*Type:* `String`<br /> | ||
*Default:* `null`<br /> | ||
*Version:* 0.1.6 and above | ||
Custom input arguments as specified at https://github.com/aheckmann/gm#custom-arguments | ||
* **options.customOut** | ||
*Type:* `String`<br /> | ||
*Default:* `null`<br /> | ||
*Version:* 0.1.6 and above | ||
Custom output arguments as specified at https://github.com/aheckmann/gm#custom-arguments | ||
### Usage Examples | ||
@@ -221,0 +243,0 @@ |
@@ -34,2 +34,5 @@ /** | ||
upscale: false, // whether to upscale the image | ||
sample: false, | ||
customIn: null, | ||
customOut: null, | ||
sizes: [{ | ||
@@ -350,2 +353,8 @@ name: 'small', | ||
if (sizeOptions.customIn) { | ||
image.in(sizeOptions.customIn); | ||
} | ||
if (sizeOptions.customOut) { | ||
image.out(sizeOptions.customOut); | ||
} | ||
@@ -356,5 +365,11 @@ if (sizeOptions.filter) { | ||
image | ||
.resize(sizeOptions.width, sizeOptions.height, sizingMethod) | ||
.quality(sizeOptions.quality); | ||
if (sizeOptions.sample) { | ||
image | ||
.sample(sizeOptions.width, sizeOptions.height, sizingMethod) | ||
.quality(sizeOptions.quality); | ||
} else { | ||
image | ||
.resize(sizeOptions.width, sizeOptions.height, sizingMethod) | ||
.quality(sizeOptions.quality); | ||
} | ||
@@ -361,0 +376,0 @@ if (mode === 'crop') { |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
855
437
0
44623
6