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
// Read a raw array of pixels and save it to a png
const input = Uint8Array.from([255, 255, 255, 0, 0, 0]); // or Uint8ClampedArray
const image = sharp(input, {
// because the input does not contain its dimensions or how many channels it has
// we need to specify it in the constructor options
raw: {
width: 2,
height: 1,
channels: 3
}
});
await image.toFile('my-two-pixels.png');
Please provide sample image(s) that help explain this question
N/A
The text was updated successfully, but these errors were encountered:
Question about an existing feature
RAW images take up a lot of memory. Is there a way to stream RAW to reduce memory requirements?
What are you trying to achieve?
Stream RAW input to reduce memory requirements.
When you searched for similar issues, what did you find that might be related?
#220
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question
Example from https://sharp.pixelplumbing.com/api-constructor has the entire image in memory instead of streaming.
Please provide sample image(s) that help explain this question
N/A
The text was updated successfully, but these errors were encountered: