Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-image files -or- read mods issue #85

Open
robStewart-128 opened this issue Jul 24, 2020 · 2 comments
Open

Multi-image files -or- read mods issue #85

robStewart-128 opened this issue Jul 24, 2020 · 2 comments

Comments

@robStewart-128
Copy link

I'm trying to pull out single images from a multi-image TIFF using read mods...

The command is equivalent to (from a multi-image TIFF of 10 images extract the 0th image):
convert srcFile.tif[0] dstFile.tif

Output file is undefined, errors in console are...

convert: UnableToOpenBlob 'srcFile.tif': No such file or directory @ error/blob.c/OpenBlob/3485.
convert: NoImagesDefined `dstFile.tif' @ error/convert.c/ConvertImageCommand/3300.

This happens no matter the image number (zero to nine).
Does WASM-ImageMagick support this?

@KnicKnic
Copy link
Owner

I tried using mylink
with image from http://www.nightprogrammer.org/wp-uploads/2013/02/multipage_tiff_example-300x225.jpg
https://www.nightprogrammer.org/development/multipage-tiff-example-download-test-image-file/

And I got that jpeg wasn't supported. I am not familiar with multi file tiffs. I am not sure if you need to enable features in the compiler to support them or not.

@robStewart-128
Copy link
Author

robStewart-128 commented Jul 29, 2020

Only certain image formats support Images with multiple images, pages or frames. Animated GIFs are an example. TIFFs can support them too. Basic JPGs, PNGs do not. (Putting aside APNG/MNG).
Read mods include image, page or frame selection with the use of the single number in the square bracket "[1]" and other things.
Use "identify" on an image and you'll see a related number in square brackets in multiple lines of output (Note - even the dimensions can change)...

srcFile[0] TIFF 1903x899 1903x899+0+0 8-bit sRGB 34.2717MiB 0.000u 0:00.000
srcFile[1] TIFF 1903x899 1903x899+0+0 8-bit sRGB 0.000u 0:00.000
...
srcFile[9] TIFF 1903x873 1903x873+0+0 8-bit sRGB 0.000u 0:00.000

You can find example TIFFs here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants