@loaders.gl/images 4.1.0-alpha.1 → 4.1.0-alpha.3
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.
- package/dist/dist.dev.js +1 -1
- package/dist/image-writer.d.ts.map +1 -1
- package/dist/image-writer.js.map +1 -1
- package/dist/lib/category-api/image-format.d.ts.map +1 -1
- package/dist/lib/category-api/image-format.js.map +1 -1
- package/dist/lib/category-api/parse-isobmff-binary.d.ts.map +1 -1
- package/dist/lib/category-api/parse-isobmff-binary.js.map +1 -1
- package/dist/lib/utils/version.js +1 -1
- package/dist/lib/utils/version.js.map +1 -1
- package/package.json +3 -3
- package/src/image-writer.ts +2 -1
- package/src/lib/category-api/image-format.ts +2 -1
- package/src/lib/category-api/parse-isobmff-binary.ts +2 -1
package/dist/dist.dev.js
CHANGED
|
@@ -42,7 +42,7 @@ var __exports__ = (() => {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
// src/lib/utils/version.ts
|
|
45
|
-
var VERSION =
|
|
45
|
+
var VERSION = true ? "4.1.0-alpha.3" : "latest";
|
|
46
46
|
|
|
47
47
|
// ../loader-utils/src/lib/env-utils/assert.ts
|
|
48
48
|
function assert(condition, message) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-writer.d.ts","sourceRoot":"","sources":["../src/image-writer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-writer.d.ts","sourceRoot":"","sources":["../src/image-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAI3C,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,WAAW,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAanF,CAAC"}
|
package/dist/image-writer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-writer.js","names":["VERSION","encodeImage","ImageWriter","name","id","module","version","extensions","options","image","mimeType","jpegQuality","encode"],"sources":["../src/image-writer.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"image-writer.js","names":["VERSION","encodeImage","ImageWriter","name","id","module","version","extensions","options","image","mimeType","jpegQuality","encode"],"sources":["../src/image-writer.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils';\nimport type {ImageDataType} from './types';\nimport {VERSION} from './lib/utils/version';\nimport {encodeImage} from './lib/encoders/encode-image';\n\nexport type ImageWriterOptions = WriterOptions & {\n image?: {\n mimeType?: 'image/png';\n jpegQuality?: number | null;\n };\n};\n\n/** Writer for image data */\nexport const ImageWriter: WriterWithEncoder<ImageDataType, never, ImageWriterOptions> = {\n name: 'Images',\n id: 'image',\n module: 'images',\n version: VERSION,\n extensions: ['jpeg'],\n options: {\n image: {\n mimeType: 'image/png',\n jpegQuality: null\n }\n },\n encode: encodeImage\n};\n"],"mappings":"SAMQA,OAAO;AAAA,SACPC,WAAW;AAUnB,OAAO,MAAMC,WAAwE,GAAG;EACtFC,IAAI,EAAE,QAAQ;EACdC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,QAAQ;EAChBC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,MAAM,CAAC;EACpBC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,QAAQ,EAAE,WAAW;MACrBC,WAAW,EAAE;IACf;EACF,CAAC;EACDC,MAAM,EAAEX;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-format.d.ts","sourceRoot":"","sources":["../../../src/lib/category-api/image-format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-format.d.ts","sourceRoot":"","sources":["../../../src/lib/category-api/image-format.ts"],"names":[],"mappings":"AAuBA,+FAA+F;AAC/F,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAgBrE;AAKD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-format.js","names":["isBrowser","MIME_TYPES","mimeTypeSupportedPromise","getSupportedImageFormats","supportedMimeTypes","Set","mimeType","supported","checkBrowserImageFormatSupportAsync","checkNodeImageFormatSupport","add","mimeTypeSupportedSync","isImageFormatSupported","undefined","checkBrowserImageFormatSupport","_globalThis$loaders","_globalThis$loaders2","NODE_FORMAT_SUPPORT","imageFormatsNode","globalThis","loaders","parseImageNode","Boolean","includes","testBrowserImageFormatSupport","TEST_IMAGE","dataURL","testBrowserImageFormatSupportAsync","element","document","createElement","toDataURL","indexOf","testImageDataURL","Promise","resolve","image","Image","src","onload","height","onerror"],"sources":["../../../src/lib/category-api/image-format.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"image-format.js","names":["isBrowser","MIME_TYPES","mimeTypeSupportedPromise","getSupportedImageFormats","supportedMimeTypes","Set","mimeType","supported","checkBrowserImageFormatSupportAsync","checkNodeImageFormatSupport","add","mimeTypeSupportedSync","isImageFormatSupported","undefined","checkBrowserImageFormatSupport","_globalThis$loaders","_globalThis$loaders2","NODE_FORMAT_SUPPORT","imageFormatsNode","globalThis","loaders","parseImageNode","Boolean","includes","testBrowserImageFormatSupport","TEST_IMAGE","dataURL","testBrowserImageFormatSupportAsync","element","document","createElement","toDataURL","indexOf","testImageDataURL","Promise","resolve","image","Image","src","onload","height","onerror"],"sources":["../../../src/lib/category-api/image-format.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {isBrowser} from '@loaders.gl/loader-utils';\n\nconst MIME_TYPES = [\n 'image/png',\n 'image/jpeg',\n 'image/gif',\n 'image/webp',\n 'image/avif',\n 'image/tiff',\n // TODO - what is the correct type for SVG\n 'image/svg',\n 'image/svg+xml',\n 'image/bmp',\n 'image/vnd.microsoft.icon'\n];\n\n/** Only one round of tests is performed */\nconst mimeTypeSupportedPromise: Promise<Set<string>> | null = null;\n\n/** Run-time browser detection of file formats requires async tests for most precise results */\nexport async function getSupportedImageFormats(): Promise<Set<string>> {\n if (mimeTypeSupportedPromise) {\n return await mimeTypeSupportedPromise;\n }\n\n const supportedMimeTypes = new Set<string>();\n for (const mimeType of MIME_TYPES) {\n const supported = isBrowser\n ? await checkBrowserImageFormatSupportAsync(mimeType)\n : checkNodeImageFormatSupport(mimeType);\n if (supported) {\n supportedMimeTypes.add(mimeType);\n }\n }\n\n return supportedMimeTypes;\n}\n\n/** Cache sync values for speed */\nconst mimeTypeSupportedSync: {[mimeType: string]: boolean} = {};\n\n/**\n * Check if image MIME type is supported. Result is cached to avoid repeated tests.\n */\nexport function isImageFormatSupported(mimeType: string): boolean {\n if (mimeTypeSupportedSync[mimeType] === undefined) {\n const supported = isBrowser\n ? checkBrowserImageFormatSupport(mimeType)\n : checkNodeImageFormatSupport(mimeType);\n mimeTypeSupportedSync[mimeType] = supported;\n }\n return mimeTypeSupportedSync[mimeType];\n}\n\n/**\n * Checks that polyfills are installed and that mimeType is supported by polyfills\n * @todo Ideally polyfills should declare what formats they support, instead of storing that data here.\n */\nfunction checkNodeImageFormatSupport(mimeType: string): boolean {\n const NODE_FORMAT_SUPPORT = ['image/png', 'image/jpeg', 'image/gif'];\n const imageFormatsNode = globalThis.loaders?.imageFormatsNode || NODE_FORMAT_SUPPORT;\n const parseImageNode = globalThis.loaders?.parseImageNode;\n return Boolean(parseImageNode) && imageFormatsNode.includes(mimeType);\n}\n\n/** Checks image format support synchronously.\n * @note Unreliable, fails on AVIF\n */\nfunction checkBrowserImageFormatSupport(mimeType: string): boolean {\n switch (mimeType) {\n case 'image/avif': // Will fail\n case 'image/webp':\n return testBrowserImageFormatSupport(mimeType);\n default:\n return true;\n }\n}\n\nconst TEST_IMAGE = {\n 'image/avif':\n 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=',\n // Lossy test image. Support for lossy images doesn't guarantee support for all WebP images.\n 'image/webp': 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'\n};\n\n/** Checks WebP and AVIF support asynchronously */\nasync function checkBrowserImageFormatSupportAsync(mimeType: string): Promise<boolean> {\n const dataURL = TEST_IMAGE[mimeType];\n return dataURL ? await testBrowserImageFormatSupportAsync(dataURL) : true;\n}\n\n/**\n * Checks browser synchronously\n * Checks if toDataURL supports the mimeType.\n * @note Imperfect testOn Chrome this is true for WebP but not for AVIF\n */\nfunction testBrowserImageFormatSupport(mimeType: string): boolean {\n try {\n const element = document.createElement('canvas');\n const dataURL = element.toDataURL(mimeType);\n return dataURL.indexOf(`data:${mimeType}`) === 0;\n } catch {\n // Probably Safari...\n return false;\n }\n}\n\n// Check WebPSupport asynchronously\nasync function testBrowserImageFormatSupportAsync(testImageDataURL: string): Promise<boolean> {\n return new Promise((resolve) => {\n const image = new Image();\n image.src = testImageDataURL;\n image.onload = () => resolve(image.height > 0);\n image.onerror = () => resolve(false);\n });\n}\n"],"mappings":"AAIA,SAAQA,SAAS,QAAO,0BAA0B;AAElD,MAAMC,UAAU,GAAG,CACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EAEZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,0BAA0B,CAC3B;AAGD,MAAMC,wBAAqD,GAAG,IAAI;AAGlE,OAAO,eAAeC,wBAAwBA,CAAA,EAAyB;EACrE,IAAID,wBAAwB,EAAE;IAC5B,OAAO,MAAMA,wBAAwB;EACvC;EAEA,MAAME,kBAAkB,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC5C,KAAK,MAAMC,QAAQ,IAAIL,UAAU,EAAE;IACjC,MAAMM,SAAS,GAAGP,SAAS,GACvB,MAAMQ,mCAAmC,CAACF,QAAQ,CAAC,GACnDG,2BAA2B,CAACH,QAAQ,CAAC;IACzC,IAAIC,SAAS,EAAE;MACbH,kBAAkB,CAACM,GAAG,CAACJ,QAAQ,CAAC;IAClC;EACF;EAEA,OAAOF,kBAAkB;AAC3B;AAGA,MAAMO,qBAAoD,GAAG,CAAC,CAAC;AAK/D,OAAO,SAASC,sBAAsBA,CAACN,QAAgB,EAAW;EAChE,IAAIK,qBAAqB,CAACL,QAAQ,CAAC,KAAKO,SAAS,EAAE;IACjD,MAAMN,SAAS,GAAGP,SAAS,GACvBc,8BAA8B,CAACR,QAAQ,CAAC,GACxCG,2BAA2B,CAACH,QAAQ,CAAC;IACzCK,qBAAqB,CAACL,QAAQ,CAAC,GAAGC,SAAS;EAC7C;EACA,OAAOI,qBAAqB,CAACL,QAAQ,CAAC;AACxC;AAMA,SAASG,2BAA2BA,CAACH,QAAg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oB;EAC5F,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAK;IAC9B,MAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,CAAC;IACzBD,KAAK,CAACE,GAAG,GAAGL,gBAAgB;IAC5BG,KAAK,CAACG,MAAM,GAAG,MAAMJ,OAAO,CAACC,KAAK,CAACI,MAAM,GAAG,CAAC,CAAC;IAC9CJ,KAAK,CAACK,OAAO,GAAG,MAAMN,OAAO,CAAC,KAAK,CAAC;EACtC,CAAC,CAAC;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-isobmff-binary.d.ts","sourceRoot":"","sources":["../../../src/lib/category-api/parse-isobmff-binary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-isobmff-binary.d.ts","sourceRoot":"","sources":["../../../src/lib/category-api/parse-isobmff-binary.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAa1E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAmDvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-isobmff-binary.js","names":["getISOBMFFMediaType","buffer","checkString","decodeMajorBrand","brandMajor","getUTF8String","replace","trim","extension","mimeType","array","start","end","String","fromCharCode","slice","stringToBytes","string","map","character","charCodeAt","header","offset","arguments","length","undefined","headerBytes","i"],"sources":["../../../src/lib/category-api/parse-isobmff-binary.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"parse-isobmff-binary.js","names":["getISOBMFFMediaType","buffer","checkString","decodeMajorBrand","brandMajor","getUTF8String","replace","trim","extension","mimeType","array","start","end","String","fromCharCode","slice","stringToBytes","string","map","character","charCodeAt","header","offset","arguments","length","undefined","headerBytes","i"],"sources":["../../../src/lib/category-api/parse-isobmff-binary.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// code adapted from https://github.com/sindresorhus/file-type under MIT license\n\n/**\n * Box is a container format that can contain a variety of media related files,\n * so we want to return information about which type of file is actually contained inside\n */\nexport type BoxFileType = {extension: string; mimeType: string};\n\n/**\n * Tests if a buffer is in ISO base media file format (ISOBMFF) @see https://en.wikipedia.org/wiki/ISO_base_media_file_format\n * (ISOBMFF is a media container standard based on the Apple QuickTime container format)\n */\nexport function getISOBMFFMediaType(buffer: Uint8Array): BoxFileType | null {\n // Almost all ISO base media files start with `ftyp` box. (It's not required to be first, but it's recommended to be.)\n if (!checkString(buffer, 'ftyp', 4)) {\n return null;\n }\n\n // Extra check: test for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character).\n if ((buffer[8] & 0x60) === 0x00) {\n return null;\n }\n\n // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters.\n return decodeMajorBrand(buffer);\n}\n\n/**\n * brands explained @see https://github.com/strukturag/libheif/issues/83\n * code adapted from @see https://github.com/sindresorhus/file-type/blob/main/core.js#L489-L492\n */\nexport function decodeMajorBrand(buffer: Uint8Array): BoxFileType | null {\n const brandMajor = getUTF8String(buffer, 8, 12).replace('\\0', ' ').trim();\n\n switch (brandMajor) {\n case 'avif':\n case 'avis':\n return {extension: 'avif', mimeType: 'image/avif'};\n default:\n return null;\n }\n // We don't need these now, but they are easy to add\n // case 'mif1':\n // return {extension: 'heic', mimeType: 'image/heif'};\n // case 'msf1':\n // return {extension: 'heic', mimeType: 'image/heif-sequence'};\n // case 'heic':\n // case 'heix':\n // return {extension: 'heic', mimeType: 'image/heic'};\n // case 'hevc':\n // case 'hevx':\n // return {extension: 'heic', mimeType: 'image/heic-sequence'};\n // case 'qt':\n // return {ext: 'mov', mime: 'video/quicktime'};\n // case 'M4V':\n // case 'M4VH':\n // case 'M4VP':\n // return {ext: 'm4v', mime: 'video/x-m4v'};\n // case 'M4P':\n // return {ext: 'm4p', mime: 'video/mp4'};\n // case 'M4B':\n // return {ext: 'm4b', mime: 'audio/mp4'};\n // case 'M4A':\n // return {ext: 'm4a', mime: 'audio/x-m4a'};\n // case 'F4V':\n // return {ext: 'f4v', mime: 'video/mp4'};\n // case 'F4P':\n // return {ext: 'f4p', mime: 'video/mp4'};\n // case 'F4A':\n // return {ext: 'f4a', mime: 'audio/mp4'};\n // case 'F4B':\n // return {ext: 'f4b', mime: 'audio/mp4'};\n // case 'crx':\n // return {ext: 'cr3', mime: 'image/x-canon-cr3'};\n // default:\n // if (brandMajor.startsWith('3g')) {\n // if (brandMajor.startsWith('3g2')) {\n // return {ext: '3g2', mime: 'video/3gpp2'};\n // }\n // return {ext: '3gp', mime: 'video/3gpp'};\n // }\n // return {ext: 'mp4', mime: 'video/mp4'};\n}\n\n/** Interpret a chunk of bytes as a UTF8 string */\nfunction getUTF8String(array: Uint8Array, start: number, end: number): string {\n return String.fromCharCode(...array.slice(start, end));\n}\n\nfunction stringToBytes(string: string): number[] {\n return [...string].map((character) => character.charCodeAt(0));\n}\n\nfunction checkString(buffer: ArrayLike<number>, header: string, offset: number = 0): boolean {\n const headerBytes = stringToBytes(header);\n\n for (let i = 0; i < headerBytes.length; ++i) {\n if (headerBytes[i] !== buffer[i + offset]) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":"AAeA,OAAO,SAASA,mBAAmBA,CAACC,MAAkB,EAAsB;EAE1E,IAAI,CAACC,WAAW,CAACD,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;IACnC,OAAO,IAAI;EACb;EAGA,IAAI,CAACA,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,IAAI,EAAE;IAC/B,OAAO,IAAI;EACb;EAGA,OAAOE,gBAAgB,CAACF,MAAM,CAAC;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'undefined' ? "4.1.0-alpha.3" : 'latest';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":["VERSION"
|
|
1
|
+
{"version":3,"file":"version.js","names":["VERSION"],"sources":["../../../src/lib/utils/version.ts"],"sourcesContent":["// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n"],"mappings":"AAGA,OAAO,MAAMA,OAAO,GAAG,sBAAkB,KAAK,WAAW,qBAAiB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/images",
|
|
3
|
-
"version": "4.1.0-alpha.
|
|
3
|
+
"version": "4.1.0-alpha.3",
|
|
4
4
|
"description": "Framework-independent loaders and writers for images (PNG, JPG, ...)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"build-bundle": "ocular-bundle ./src/index.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@loaders.gl/loader-utils": "4.1.0-alpha.
|
|
43
|
+
"@loaders.gl/loader-utils": "4.1.0-alpha.3"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "b78075a7cb8d4ecd4aac84805ce74b8ceb400cf7",
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/get-pixels": "^3.3.2"
|
|
48
48
|
}
|
package/src/image-writer.ts
CHANGED