@loaders.gl/images
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -200,3 +200,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
image.onload = () => resolve(image); | ||
image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`)); | ||
image.onerror = (error) => { | ||
const message = error instanceof Error ? error.message : "error"; | ||
reject(new Error(message)); | ||
}; | ||
} catch (error) { | ||
@@ -203,0 +206,0 @@ reject(error); |
@@ -1,2 +0,2 @@ | ||
import type { Writer, WriterOptions } from '@loaders.gl/loader-utils'; | ||
import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils'; | ||
import type { ImageDataType } from './types'; | ||
@@ -10,3 +10,3 @@ export type ImageWriterOptions = WriterOptions & { | ||
/** Writer for image data */ | ||
export declare const ImageWriter: Writer<ImageDataType, never, ImageWriterOptions>; | ||
export declare const ImageWriter: WriterWithEncoder<ImageDataType, never, ImageWriterOptions>; | ||
//# sourceMappingURL=image-writer.d.ts.map |
@@ -24,3 +24,6 @@ import { getBlobOrSVGDataUrl } from "./svg-utils.js"; | ||
image.onload = () => resolve(image); | ||
image.onerror = err => reject(new Error(`Could not load image ${url}: ${err}`)); | ||
image.onerror = error => { | ||
const message = error instanceof Error ? error.message : 'error'; | ||
reject(new Error(message)); | ||
}; | ||
} catch (error) { | ||
@@ -27,0 +30,0 @@ reject(error); |
{ | ||
"name": "@loaders.gl/images", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Framework-independent loaders and writers for images (PNG, JPG, ...)", | ||
@@ -43,5 +43,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@loaders.gl/loader-utils": "4.0.2" | ||
"@loaders.gl/loader-utils": "4.0.3" | ||
}, | ||
"gitHead": "471058d109d5652f28c32c1f296fd632f9a5c806", | ||
"gitHead": "03c871839b36c997249dabae1844df53a35d3760", | ||
"devDependencies": { | ||
@@ -48,0 +48,0 @@ "@types/get-pixels": "^3.3.2" |
// loaders.gl, MIT license | ||
// Copyright (c) vis.gl contributors | ||
import type {Writer, WriterOptions} from '@loaders.gl/loader-utils'; | ||
import type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils'; | ||
import type {ImageDataType} from './types'; | ||
@@ -17,3 +17,3 @@ import {VERSION} from './lib/utils/version'; | ||
/** Writer for image data */ | ||
export const ImageWriter: Writer<ImageDataType, never, ImageWriterOptions> = { | ||
export const ImageWriter: WriterWithEncoder<ImageDataType, never, ImageWriterOptions> = { | ||
name: 'Images', | ||
@@ -20,0 +20,0 @@ id: 'image', |
@@ -46,3 +46,6 @@ import type {ImageLoaderOptions} from '../../image-loader'; | ||
image.onload = () => resolve(image); | ||
image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`)); | ||
image.onerror = (error) => { | ||
const message = error instanceof Error ? error.message : 'error'; | ||
reject(new Error(message)); | ||
}; | ||
} catch (error) { | ||
@@ -49,0 +52,0 @@ reject(error); |
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
165858
2781
+ Added@loaders.gl/loader-utils@4.0.3(transitive)
+ Added@loaders.gl/worker-utils@4.0.3(transitive)
- Removed@loaders.gl/loader-utils@4.0.2(transitive)
- Removed@loaders.gl/worker-utils@4.0.2(transitive)