12/5/2023 0 Comments Gulp image resize![]() The value that you want the image to be scaled to. Can be used for layered formats such as PNG. See gm background documentation options.flattenĬombines image layers into one. Possible values: none to keep transparency, beige to set beige background, #888 for gray.ĭefine background color (default is white), for example when converting SVG images to PNGs. Set to true when using ImageMagick instead of GraphicsMagick. For details look for parameter -interlace with the type value set to Set to true to create interlaced images (scanline interlacing) from PNG, GIF or JPEG files For details look for parameter +profile "*" in the gm profile documentation. There are 27 other projects in the npm registry using gulp-image-resize. Start using gulp-image-resize in your project by running npm i gulp-image-resize. Therefore this is probably wanted inĬases where thumbnails are generated for web preview purposes. Latest version: 0.13.1, last published: 4 years ago. Print this may decrease image size drastically. untouched camera data or images optimized for Set to true to enforce removal of all embedded profile data like icc, exif, iptc, xmpĪnd so on. ![]() Possible values: for 4:2:2, for 4:1:1ĭefine chroma subsampling options.noProfile gulp-image-resize Install GraphicsMagick or ImageMagick Example API imageResize(options) options.width options.height options.upscale options.crop avity options.quality options.format options. Set to true to apply a slight unsharp mask after resizing. Catrom is very good for reduction, while hermite is good for enlargement). Set the filter to use when resizing (e.g. All arguments supported by gulp-rename apply. Possible values: Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc This will resize all image files in resources/assets/images and add the suffix -lg to the resized filename. Override the output format of the processed file. Ranges from 0 (really bad) to 1 (almost lossless). options.qualityĭetermines the output quality of the resized image. Doesn't have any effect, if options.crop is false. When cropping images this sets the image gravity. Possible values: NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast options.cropĭetermines whether images will be cropped after resizing to exactly match options.width and options.height. If set to false (default), image will be copied instead of resized if it would be upscaled by resizing. options.upscaleĭetermines whether images will be upscaled. options.heightĭefault value: 0 (only if width is defined)Ī number value that is passed as pixel or percentage value to imagemagick. task ( 'default', function ( ) ) API imageResize(options) options.widthĭefault value: 0 (only if height is defined)Ī number value that is passed as pixel or percentage value to imagemagick. ![]() These definitions were written by Aankhen.Var gulp = require ( 'gulp' ) var imageResize = require ( 'gulp-image-resize' ) gulp. It offers a wide range of options and operations we can use and is a whole lot faster and more flexible than alternatives like gulp-image-resize for example. Sharp is a Node.js image processing library to which we can easily use in a Gulp task. SamplingFactor?: SamplingFactor | undefined wide range of operations available (resize, rotate, masks, filters, etc.) as fast as possible Sharp. Gravity?: gm.GravityDirection | undefined index.d.ts // Type definitions for gulp-image-resize 0.13 // Project: // Definitions by: Aankhen // Definitions: // TypeScript Version: 2.4 /// import * as stream from "stream" ĭeclare function GulpImageResize( options?: GulpImageResize.Options): stream. This package contains type definitions for gulp-image-resize ( ).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |