@napi-rs/image 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +21 -9
  2. package/package.json +15 -15
package/index.d.ts CHANGED
@@ -55,7 +55,7 @@ export const enum ChromaSubsampling {
55
55
  * What if the chroma subsampling model is 4:0:0?
56
56
  * That says to use every pixel of luma data, but that each row has 0 chroma samples applied to it. The resulting image, then, is comprised solely of the luminance data—a greyscale image.
57
57
  */
58
- Yuv400 = 3
58
+ Yuv400 = 3,
59
59
  }
60
60
  export interface JpegCompressOptions {
61
61
  /** Output quality, default is 100 (lossless) */
@@ -67,7 +67,11 @@ export interface JpegCompressOptions {
67
67
  optimizeScans?: boolean | undefined | null
68
68
  }
69
69
  export function compressJpegSync(input: Buffer, options?: JpegCompressOptions | undefined | null): Buffer
70
- export function compressJpeg(input: Buffer, options?: JpegCompressOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>
70
+ export function compressJpeg(
71
+ input: Buffer,
72
+ options?: JpegCompressOptions | undefined | null,
73
+ signal?: AbortSignal | undefined | null,
74
+ ): Promise<Buffer>
71
75
  export const enum CompressionType {
72
76
  /** Default compression level */
73
77
  Default = 0,
@@ -78,7 +82,7 @@ export const enum CompressionType {
78
82
  /** Huffman coding compression */
79
83
  Huffman = 3,
80
84
  /** Run-length encoding compression */
81
- Rle = 4
85
+ Rle = 4,
82
86
  }
83
87
  export const enum FilterType {
84
88
  /**
@@ -98,7 +102,7 @@ export const enum FilterType {
98
102
  * Uses a heuristic to select one of the preceding filters for each
99
103
  * scanline rather than one filter for the entire image
100
104
  */
101
- Adaptive = 5
105
+ Adaptive = 5,
102
106
  }
103
107
  export interface PngEncodeOptions {
104
108
  /** Default is `CompressionType::Default` */
@@ -151,7 +155,11 @@ export interface PNGLosslessOptions {
151
155
  useHeuristics?: boolean | undefined | null
152
156
  }
153
157
  export function losslessCompressPngSync(input: Buffer, options?: PNGLosslessOptions | undefined | null): Buffer
154
- export function losslessCompressPng(input: Buffer, options?: PNGLosslessOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>
158
+ export function losslessCompressPng(
159
+ input: Buffer,
160
+ options?: PNGLosslessOptions | undefined | null,
161
+ signal?: AbortSignal | undefined | null,
162
+ ): Promise<Buffer>
155
163
  export interface PngQuantOptions {
156
164
  /** default is 70 */
157
165
  minQuality?: number | undefined | null
@@ -170,7 +178,11 @@ export interface PngQuantOptions {
170
178
  posterization?: number | undefined | null
171
179
  }
172
180
  export function pngQuantizeSync(input: Buffer, options?: PngQuantOptions | undefined | null): Buffer
173
- export function pngQuantize(input: Buffer, options?: PngQuantOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>
181
+ export function pngQuantize(
182
+ input: Buffer,
183
+ options?: PngQuantOptions | undefined | null,
184
+ signal?: AbortSignal | undefined | null,
185
+ ): Promise<Buffer>
174
186
  export const enum Orientation {
175
187
  /** Normal */
176
188
  Horizontal = 1,
@@ -180,7 +192,7 @@ export const enum Orientation {
180
192
  MirrorHorizontalAndRotate270Cw = 5,
181
193
  Rotate90Cw = 6,
182
194
  MirrorHorizontalAndRotate90Cw = 7,
183
- Rotate270Cw = 8
195
+ Rotate270Cw = 8,
184
196
  }
185
197
  /**
186
198
  * Available Sampling Filters.
@@ -260,7 +272,7 @@ export const enum ResizeFilterType {
260
272
  /** Gaussian Filter */
261
273
  Gaussian = 3,
262
274
  /** Lanczos with window 3 */
263
- Lanczos3 = 4
275
+ Lanczos3 = 4,
264
276
  }
265
277
  export const enum JsColorType {
266
278
  /** Pixel is 8-bit luminance */
@@ -282,7 +294,7 @@ export const enum JsColorType {
282
294
  /** Pixel is 32-bit float RGB */
283
295
  Rgb32F = 8,
284
296
  /** Pixel is 32-bit float RGBA */
285
- Rgba32F = 9
297
+ Rgba32F = 9,
286
298
  }
287
299
  export interface Metadata {
288
300
  width: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/image",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "description": "Image processing library",
@@ -56,23 +56,23 @@
56
56
  "format": "run-p format:prettier format:rs",
57
57
  "format:prettier": "prettier --config ./package.json -w .",
58
58
  "format:rs": "cargo fmt --all",
59
- "prepublishOnly": "napi prepublish -t npm",
59
+ "prepublishOnly": "napi prepublish",
60
60
  "version": "napi version"
61
61
  },
62
62
  "repository": "git@github.com:Brooooooklyn/Image.git",
63
- "gitHead": "0aa7effa90873c50d9cd418b873fde5b07d670d6",
63
+ "gitHead": "e61083611a6e16e07b38eaefee8d2537c93efe2c",
64
64
  "optionalDependencies": {
65
- "@napi-rs/image-win32-x64-msvc": "1.1.0",
66
- "@napi-rs/image-darwin-x64": "1.1.0",
67
- "@napi-rs/image-linux-x64-gnu": "1.1.0",
68
- "@napi-rs/image-darwin-arm64": "1.1.0",
69
- "@napi-rs/image-android-arm64": "1.1.0",
70
- "@napi-rs/image-linux-arm64-gnu": "1.1.0",
71
- "@napi-rs/image-linux-arm64-musl": "1.1.0",
72
- "@napi-rs/image-linux-arm-gnueabihf": "1.1.0",
73
- "@napi-rs/image-linux-x64-musl": "1.1.0",
74
- "@napi-rs/image-freebsd-x64": "1.1.0",
75
- "@napi-rs/image-win32-ia32-msvc": "1.1.0",
76
- "@napi-rs/image-android-arm-eabi": "1.1.0"
65
+ "@napi-rs/image-win32-x64-msvc": "1.1.1",
66
+ "@napi-rs/image-darwin-x64": "1.1.1",
67
+ "@napi-rs/image-linux-x64-gnu": "1.1.1",
68
+ "@napi-rs/image-darwin-arm64": "1.1.1",
69
+ "@napi-rs/image-android-arm64": "1.1.1",
70
+ "@napi-rs/image-linux-arm64-gnu": "1.1.1",
71
+ "@napi-rs/image-linux-arm64-musl": "1.1.1",
72
+ "@napi-rs/image-linux-arm-gnueabihf": "1.1.1",
73
+ "@napi-rs/image-linux-x64-musl": "1.1.1",
74
+ "@napi-rs/image-freebsd-x64": "1.1.1",
75
+ "@napi-rs/image-win32-ia32-msvc": "1.1.1",
76
+ "@napi-rs/image-android-arm-eabi": "1.1.1"
77
77
  }
78
78
  }