Closed vinodkpasi closed 4 years ago
The default spritesmith
engine is pixelsmith
which uses get-pixels
and save-pixels
under the hood. This is a pure JS implementation which doesn't support WebP images
https://github.com/twolfson/pixelsmith
It doesn't look like there's any existing webp
libraries that are pure JS (i.e. most seem to use native libraries) so it'd add unnecessary restrictions to pixelsmith
if we were to bundle that functionality into it:
Options for you:
pixelsmith
(or write a new engine) which can handle webp
imageswebp
images to png
so they can be handled by pixelsmith
png
instead of webp
I am getting the below error message while creating the sprite image for webp images.
Error: Unsupported file type: image/webp (c:\Box Sync\MyData\Projects\espl-api\images\customeritems\10.webp) at doParse (c:\Box Sync\MyData\Projects\espl-api\node_modules\get-pixels\node-pixels.js:126:10) at getPixels (c:\Box Sync\MyData\Projects\espl-api\node_modules\get-pixels\node-pixels.js:140:5) at handleFileBuffer (c:\Box Sync\MyData\Projects\espl-api\node_modules\pixelsmith\lib\engine.js:45:13) at ConcatStream. (c:\Box Sync\MyData\Projects\espl-api\node_modules\concat-stream\index.js:36:43)
at ConcatStream.emit (events.js:311:20)
at finishMaybe (c:\Box Sync\MyData\Projects\espl-api\node_modules\concat-stream\node_modules\readable-stream\lib_stream_writable.js:475:14)
at afterWrite (c:\Box Sync\MyData\Projects\espl-api\node_modules\concat-stream\node_modules\readable-stream\lib_stream_writable.js:361:3)
at processTicksAndRejections (internal/process/task_queues.js:86:21)
at runNextTicks (internal/process/task_queues.js:66:3)
at processImmediate (internal/timers.js:429:9)