Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@mole-inc/imagemin-mozjpeg
Advanced tools
$ npm install @mole-inc/imagemin-mozjpeg
const imagemin = require('imagemin');
const imageminMozjpeg = require('@mole-inc/imagemin-mozjpeg');
(async () => {
await imagemin(['images/*.jpg'], 'build/images', {
use: [
imageminMozjpeg()
]
});
console.log('Images optimized');
})();
Returns a Promise<Buffer>
.
Type: number
Compression quality, in range 0
(worst) to 100
(perfect).
Type: boolean
Default: true
false
creates baseline JPEG file.
Type: boolean
Default: false
Input file is Targa format (usually not needed).
Type: boolean
Default: false
Revert to standard defaults instead of mozjpeg defaults.
Type: boolean
Default: false
Disable progressive scan optimization.
Type: number
Default: 1
Set DC scan optimization mode.
0
One scan for all components1
One scan per component2
Optimize between one scan for all components and one scan for 1st component plus one scan for remaining componentsType: boolean
Default: true
Type: boolean
Default: true
Trellis optimization of DC coefficients.
Type: string
Default: hvs-psnr
Set Trellis optimization method. Available methods: psnr
, hvs-psnr
, ssim
, ms-ssim
Type: boolean
Default: true
Black-on-white deringing via overshoot.
Type: boolean
Default: false
Use arithmetic coding.
Type: string
Default: int
Set DCT method:
int
Use integer DCTfast
Use fast integer DCT (less accurate)float
Use floating-point DCTType: boolean
Default: false
Use 8-bit quantization table entries for baseline JPEG compatibility.
Type: number
Use predefined quantization table.
0
JPEG Annex K1
Flat2
Custom, tuned for MS-SSIM3
ImageMagick table by N. Robidoux4
Custom, tuned for PSNR-HVS5
Table from paper by Klein, Silverstein and CarneyType: number
Set the strength of smooth dithered input. (1...100)
Type: number
Set the maximum memory to use in kilobytes.
Type: string[]
Set component sampling factors. Each item should be in the format HxV
, for example 2x1
.
Type: buffer
Buffer to optimize.
This is a fork of imagemin/imagemin-mozjpeg.
see license file.
FAQs
Imagemin plugin for mozjpeg
We found that @mole-inc/imagemin-mozjpeg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.