@napi-rs/image
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -8,11 +8,11 @@ /* tslint:disable */ | ||
/** 0-100 scale, 100 is lossless */ | ||
quality?: number | undefined | null | ||
quality?: number | ||
/** 0-100 scale */ | ||
alphaQuality?: number | undefined | null | ||
alphaQuality?: number | ||
/** rav1e preset 1 (slow) 10 (fast but crappy), default is 4 */ | ||
speed?: number | undefined | null | ||
speed?: number | ||
/** How many threads should be used (0 = match core count) */ | ||
threads?: number | undefined | null | ||
threads?: number | ||
/** set to '4:2:0' to use chroma subsampling, default '4:4:4' */ | ||
chromaSubsampling?: ChromaSubsampling | undefined | null | ||
chromaSubsampling?: ChromaSubsampling | ||
} | ||
@@ -63,3 +63,3 @@ /** | ||
/** Output quality, default is 100 (lossless) */ | ||
quality?: number | undefined | null | ||
quality?: number | ||
/** | ||
@@ -69,3 +69,3 @@ * If true, it will use MozJPEG’s scan optimization. Makes progressive image files smaller. | ||
*/ | ||
optimizeScans?: boolean | undefined | null | ||
optimizeScans?: boolean | ||
} | ||
@@ -108,5 +108,5 @@ export function compressJpegSync(input: Buffer, options?: JpegCompressOptions | undefined | null): Buffer | ||
/** Default is `CompressionType::Default` */ | ||
compressionType?: CompressionType | undefined | null | ||
compressionType?: CompressionType | ||
/** Default is `FilterType::NoFilter` */ | ||
filterType?: FilterType | undefined | null | ||
filterType?: FilterType | ||
} | ||
@@ -118,3 +118,3 @@ export interface PNGLosslessOptions { | ||
*/ | ||
fixErrors?: boolean | undefined | null | ||
fixErrors?: boolean | ||
/** | ||
@@ -124,5 +124,5 @@ * Write to output even if there was no improvement in compression. | ||
*/ | ||
force?: boolean | undefined | null | ||
force?: boolean | ||
/** Which filters to try on the file (0-5) */ | ||
filter?: Array<number> | undefined | null | ||
filter?: Array<number> | ||
/** | ||
@@ -132,3 +132,3 @@ * Whether to attempt bit depth reduction | ||
*/ | ||
bitDepthReduction?: boolean | undefined | null | ||
bitDepthReduction?: boolean | ||
/** | ||
@@ -138,3 +138,3 @@ * Whether to attempt color type reduction | ||
*/ | ||
colorTypeReduction?: boolean | undefined | null | ||
colorTypeReduction?: boolean | ||
/** | ||
@@ -144,3 +144,3 @@ * Whether to attempt palette reduction | ||
*/ | ||
paletteReduction?: boolean | undefined | null | ||
paletteReduction?: boolean | ||
/** | ||
@@ -150,3 +150,3 @@ * Whether to attempt grayscale reduction | ||
*/ | ||
grayscaleReduction?: boolean | undefined | null | ||
grayscaleReduction?: boolean | ||
/** | ||
@@ -157,7 +157,7 @@ * Whether to perform IDAT recoding | ||
*/ | ||
idatRecoding?: boolean | undefined | null | ||
idatRecoding?: boolean | ||
/** Whether to remove ***All non-critical headers*** on PNG */ | ||
strip?: boolean | undefined | null | ||
strip?: boolean | ||
/** Whether to use heuristics to pick the best filter and compression */ | ||
useHeuristics?: boolean | undefined | null | ||
useHeuristics?: boolean | ||
} | ||
@@ -168,5 +168,5 @@ export function losslessCompressPngSync(input: Buffer, options?: PNGLosslessOptions | undefined | null): Buffer | ||
/** default is 70 */ | ||
minQuality?: number | undefined | null | ||
minQuality?: number | ||
/** default is 99 */ | ||
maxQuality?: number | undefined | null | ||
maxQuality?: number | ||
/** | ||
@@ -177,3 +177,3 @@ * 1- 10 | ||
*/ | ||
speed?: number | undefined | null | ||
speed?: number | ||
/** | ||
@@ -183,3 +183,3 @@ * Number of least significant bits to ignore. | ||
*/ | ||
posterization?: number | undefined | null | ||
posterization?: number | ||
} | ||
@@ -304,4 +304,4 @@ export function pngQuantizeSync(input: Buffer, options?: PngQuantOptions | undefined | null): Buffer | ||
height: number | ||
exif?: Record<string, string> | undefined | null | ||
orientation?: number | undefined | null | ||
exif?: Record<string, string> | ||
orientation?: number | ||
format: string | ||
@@ -370,2 +370,6 @@ colorType: JsColorType | ||
crop(x: number, y: number, width: number, height: number): this | ||
/** Return this image's pixels as a native endian byte slice. */ | ||
rawPixels(signal?: AbortSignal | undefined | null): Promise<Buffer> | ||
/** Return this image's pixels as a native endian byte slice. */ | ||
rawPixelsSync(): Buffer | ||
/** | ||
@@ -372,0 +376,0 @@ * The quality factor `quality_factor` ranges from 0 to 100 and controls the loss and quality during compression. |
{ | ||
"name": "@napi-rs/image", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"main": "index.js", | ||
@@ -64,19 +64,19 @@ "types": "index.d.ts", | ||
"devDependencies": { | ||
"@napi-rs/cli": "^2.6.2" | ||
"@napi-rs/cli": "^2.9.0" | ||
}, | ||
"gitHead": "dfcd5d09749c394ba939ee72534e36c70d4cc445", | ||
"gitHead": "e2e01fdd67e087b1468a933bbe5ea15d40a41315", | ||
"optionalDependencies": { | ||
"@napi-rs/image-win32-x64-msvc": "1.2.0", | ||
"@napi-rs/image-darwin-x64": "1.2.0", | ||
"@napi-rs/image-linux-x64-gnu": "1.2.0", | ||
"@napi-rs/image-darwin-arm64": "1.2.0", | ||
"@napi-rs/image-android-arm64": "1.2.0", | ||
"@napi-rs/image-linux-arm64-gnu": "1.2.0", | ||
"@napi-rs/image-linux-arm64-musl": "1.2.0", | ||
"@napi-rs/image-linux-arm-gnueabihf": "1.2.0", | ||
"@napi-rs/image-linux-x64-musl": "1.2.0", | ||
"@napi-rs/image-freebsd-x64": "1.2.0", | ||
"@napi-rs/image-win32-ia32-msvc": "1.2.0", | ||
"@napi-rs/image-android-arm-eabi": "1.2.0" | ||
"@napi-rs/image-win32-x64-msvc": "1.3.0", | ||
"@napi-rs/image-darwin-x64": "1.3.0", | ||
"@napi-rs/image-linux-x64-gnu": "1.3.0", | ||
"@napi-rs/image-darwin-arm64": "1.3.0", | ||
"@napi-rs/image-android-arm64": "1.3.0", | ||
"@napi-rs/image-linux-arm64-gnu": "1.3.0", | ||
"@napi-rs/image-linux-arm64-musl": "1.3.0", | ||
"@napi-rs/image-linux-arm-gnueabihf": "1.3.0", | ||
"@napi-rs/image-linux-x64-musl": "1.3.0", | ||
"@napi-rs/image-freebsd-x64": "1.3.0", | ||
"@napi-rs/image-win32-ia32-msvc": "1.3.0", | ||
"@napi-rs/image-android-arm-eabi": "1.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
637
46545