You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a browser app I'm reading a base64-string from a buffer. The original image is 3072 x 512 pixels.
This takes quite a while to be read (around 500 ms). Is this normal behaviour?
The image is made of 6 webp images of 512x512 each, which I merge with the merge-images package, since Jimp doesn't support reading webp. The reading of the 6 separate image files, merging them and outputting this to a base64-string with merge-images takes only about 250 ms in total.
Here's my code:
const base64 = '<... the base64 string of 6 merged webp images...>';
const url = base64.replace(/^data:image\/\w+;base64,/, '');
const buffer = Buffer.from(url, 'base64');
await Jimp.read(buffer)
.then((img) => {
//this takes about 500 ms
}};
My system is not slow at all and it has 16GB of memory.
Browser: Chrome: 125.0.6422.77
Jimp Version: 0.22.12
Operating System: Windows 10
Node version: 20.11.1
Any idea's why reading from a base64 string is this slow?
The text was updated successfully, but these errors were encountered:
In a browser app I'm reading a base64-string from a buffer. The original image is 3072 x 512 pixels.
This takes quite a while to be read (around 500 ms). Is this normal behaviour?
The image is made of 6
webp
images of 512x512 each, which I merge with themerge-images
package, since Jimp doesn't support readingwebp
. The reading of the 6 separate image files, merging them and outputting this to a base64-string withmerge-images
takes only about 250 ms in total.Here's my code:
My system is not slow at all and it has 16GB of memory.
Any idea's why reading from a base64 string is this slow?
The text was updated successfully, but these errors were encountered: