@jimp/js-jpeg
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -0,1 +1,23 @@ | ||
# v1.5.0 (Sat Sep 07 2024) | ||
### Release Notes | ||
#### Add support for image decoder options ([#1336](https://github.com/jimp-dev/jimp/pull/1336)) | ||
Can now have options for the underlying image codecs | ||
![CleanShot 2024-09-07 at 15 26 41](https://github.com/user-attachments/assets/26fa1a48-f463-455c-89f9-9c99f9fcb3d1) | ||
--- | ||
#### 🚀 Enhancement | ||
- Add support for image decoder options [#1336](https://github.com/jimp-dev/jimp/pull/1336) ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
#### Authors: 1 | ||
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) | ||
--- | ||
# v1.1.3 (Mon Sep 02 2024) | ||
@@ -2,0 +24,0 @@ |
@@ -5,6 +5,14 @@ import JPEG from "jpeg-js"; | ||
} | ||
export interface DecodeJpegOptions { | ||
useTArray?: false; | ||
colorTransform?: boolean; | ||
formatAsRGBA?: boolean; | ||
tolerantDecoding?: boolean; | ||
maxResolutionInMP?: number; | ||
maxMemoryUsageInMB?: number; | ||
} | ||
export default function jpeg(): { | ||
mime: "image/jpeg"; | ||
encode: (bitmap: import("@jimp/types").Bitmap, { quality }?: JPEGOptions) => Buffer; | ||
decode: (data: Buffer) => JPEG.BufferRet & { | ||
decode: (data: Buffer, options?: DecodeJpegOptions) => JPEG.BufferRet & { | ||
comments?: string[]; | ||
@@ -11,0 +19,0 @@ }; |
@@ -12,5 +12,5 @@ "use strict"; | ||
encode: (bitmap, { quality = 100 } = {}) => jpeg_js_1.default.encode(bitmap, quality).data, | ||
decode: (data) => jpeg_js_1.default.decode(data), | ||
decode: (data, options) => jpeg_js_1.default.decode(data, options), | ||
}; | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -5,6 +5,14 @@ import JPEG from "jpeg-js"; | ||
} | ||
export interface DecodeJpegOptions { | ||
useTArray?: false; | ||
colorTransform?: boolean; | ||
formatAsRGBA?: boolean; | ||
tolerantDecoding?: boolean; | ||
maxResolutionInMP?: number; | ||
maxMemoryUsageInMB?: number; | ||
} | ||
export default function jpeg(): { | ||
mime: "image/jpeg"; | ||
encode: (bitmap: import("@jimp/types").Bitmap, { quality }?: JPEGOptions) => Buffer; | ||
decode: (data: Buffer) => JPEG.BufferRet & { | ||
decode: (data: Buffer, options?: DecodeJpegOptions) => JPEG.BufferRet & { | ||
comments?: string[]; | ||
@@ -11,0 +19,0 @@ }; |
@@ -6,5 +6,5 @@ import JPEG from "jpeg-js"; | ||
encode: (bitmap, { quality = 100 } = {}) => JPEG.encode(bitmap, quality).data, | ||
decode: (data) => JPEG.decode(data), | ||
decode: (data, options) => JPEG.decode(data, options), | ||
}; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jimp/js-jpeg", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"repository": "jimp-dev/jimp", | ||
@@ -19,6 +19,6 @@ "engines": { | ||
"devDependencies": { | ||
"@jimp/config-eslint": "1.4.0", | ||
"@jimp/config-typescript": "1.4.0", | ||
"@jimp/config-vitest": "1.4.0", | ||
"@jimp/test-utils": "1.4.0", | ||
"@jimp/config-eslint": "1.5.0", | ||
"@jimp/config-typescript": "1.5.0", | ||
"@jimp/config-vitest": "1.5.0", | ||
"@jimp/test-utils": "1.5.0", | ||
"@vitest/browser": "^2.0.5", | ||
@@ -57,4 +57,4 @@ "eslint": "^9.9.1", | ||
"dependencies": { | ||
"@jimp/core": "1.4.0", | ||
"@jimp/types": "1.4.0", | ||
"@jimp/core": "1.5.0", | ||
"@jimp/types": "1.5.0", | ||
"jpeg-js": "^0.4.4" | ||
@@ -67,3 +67,3 @@ }, | ||
"module": "./dist/esm/index.js", | ||
"gitHead": "c1b91e9007f17d0702894bd9bfab8215cff764f9" | ||
"gitHead": "9b8d6106ef2498113ebcdddf8e6a4fae0b3cadff" | ||
} |
@@ -8,2 +8,11 @@ import JPEG from "jpeg-js"; | ||
export interface DecodeJpegOptions { | ||
useTArray?: false; | ||
colorTransform?: boolean; | ||
formatAsRGBA?: boolean; | ||
tolerantDecoding?: boolean; | ||
maxResolutionInMP?: number; | ||
maxMemoryUsageInMB?: number; | ||
} | ||
export default function jpeg() { | ||
@@ -14,4 +23,4 @@ return { | ||
JPEG.encode(bitmap, quality).data, | ||
decode: (data) => JPEG.decode(data), | ||
decode: (data, options?: DecodeJpegOptions) => JPEG.decode(data, options), | ||
} satisfies Format<"image/jpeg">; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
15136
165
+ Added@jimp/core@1.5.0(transitive)
+ Added@jimp/file-ops@1.5.0(transitive)
+ Added@jimp/types@1.5.0(transitive)
+ Added@jimp/utils@1.5.0(transitive)
- Removed@jimp/core@1.4.0(transitive)
- Removed@jimp/file-ops@1.4.0(transitive)
- Removed@jimp/types@1.4.0(transitive)
- Removed@jimp/utils@1.4.0(transitive)
Updated@jimp/core@1.5.0
Updated@jimp/types@1.5.0