Saturday, 15 April 2017

Graphic magic: get page from stream of tiff image

I upload multipage tiff image from cloud storage by using readStream. Image can have more than 100 pages and i dont wont to download it into temp file, because i need only one page.

in case when we have image on drive, i can write:

`gm(localPath[page]).write(format, (err, stdout, stderr) => {
stdout.pipe(someWriteStream);
})`

how can i get needed page from stream, somthing like:

`gm(stream).getPage(10).write(outPath);`



via Roman Zaiats

No comments:

Post a Comment