Execute sequentially | Execute simultaneouslyĭeveloped on the basis of gifsicle. command will be executed one by one in sequence, please use multiple n() if you need to process multiple GIFs at the same time. The default available directories are /, /out, /tem, when command is executed, all files in /out will be exported.The last line of command must contain -o /out/**.gif,.name in input can be customized, but cannot be repeated.Boolean: (optional) command ends immediately on error.Array: (optional) folder name to be used in command.String: the filename that will be used in command.File, Blob, ArrayBuffer: local files obtained via.import gifsicle from '' // or import gifsicle from ''. Import in vue $ npm i gifsicle-wasm-browser -save GifsicleTool.js By combining multiple commands, it can complete more practical functions. CompressionĪccording to the upper left and lower right cornersĪccording to the upper left corner and height and width Supports input and output of multiple GIFsįor more commands, please refer to the Gifsicle Manual.Fully restore the functionality of Gifsicle 1.92.When shrinking images with very few colors (e.g., pure black-and-white images), adding intermediate colors can improve the results.Run Gifsicle in your browser to compress, crop, frame, resize, and more on GIFs. Normally, Gifsicle’s resize algorithms use input images’ color palettes without changes. resizeColorsĪllow Gifsicle to add intermediate colors when resizing images. Other methods include sample, box, mix, catrom, mitchell, lanczos2, lanczos3. The mix method is somewhat slower, but produces better-looking results. The sample method runs very quickly, but when shrinking images, it produces noisy results. If width or height is an underscore _, that dimension is chosen so that the aspect ratio remains unchanged. Resize the output GIF to the given width and height. The halftone modes take a cell size and a color limit: halftone,10,3 creates 10-pixel wide halftone cells where each cell uses up to 3 colors. Some modes take optional parameters using commas. For special effects, try the halftone modes halftone, squarehalftone, and diagonal. The ordered mode chooses a good ordered dithering algorithm. The o3, o4, and o8 modes use smaller, more regular patterns. The ro64 mode uses a large, random-looking pattern and generally produces good results. Gifsicle also supports ordered dithering algorithms that avoid animation artifacts. This usually looks best, but can cause animation artifacts, because dithering choices will vary from frame to frame. The default, floyd-steinberg, uses Floyd-Steinberg error diffusion. Specify a dithering algorithm with the optional method argument. median-cut is the median cut algorithm described by Heckbert. blend-diversity is a modification of this: some color values are blended from groups of existing colors. diversity, the default, is xv(1)’s diversity algorithm, which uses a strict subset of the existing colors and generally produces good results. There are 19 other projects in the npm registry using types/imagemin-gifsicle. Start using types/imagemin-gifsicle in your project by running npm i types/imagemin-gifsicle. Latest version: 7.0.4, last published: a month ago. colorMethodĭetermine how a smaller colormap is chosen. TypeScript definitions for imagemin-gifsicle. Lossiness determines how many artifacts are allowed higher values can result in smaller file sizes, but cause more artifacts. lossyĪlter image colors to shrink output file size at the cost of artifacts and noise. Reduce the number of distinct colors in each output GIF to num or less. Try several optimization methods (usually slower, sometimes better results).Also uses transparency to shrink the file further.Stores only the changed portion of each image.The optimization level determines how much optimization is done higher levels take longer, but may have better results. Select an optimization level between 1 and 3. Returns a Promise with the optimized image. Const imagemin = require ( 'imagemin' ) const imageminGifsicle = require ( 'imagemin-gifsicle' ) ( async ( ) => ) ( ) API imageminGifsicle(options?)(buffer)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |