Replies: 1 comment
-
Can you explain in more detail what kind of issue you have? I also cannot reproduce it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
One specific tiff image is crashing our code,
while it is working ok with any other images (other tiff images and other formats as well)
rogue image: https://www.dropbox.com/s/97jfpi2m9l2a7f1/a239jy.tif?dl=0
crashing code:
`
// if multiple images in collection take the one with alpha layer
if (magickImageCollection.Count > 1) {
image = (MagickImage)magickImageCollection.FirstOrDefault(x => x.HasAlpha);
}
// in case we didn't have a frame with alpha
if (image == null) {
image = (MagickImage)magickImageCollection.Flatten(new MagickColor(MagickColors.Transparent));
}
`
the magickImageCollection.Flatten is returning a weird image
It looks like this specific tiff has only one frame in the collection, and thus i added this code to extract the image
if (magickImageCollection.Count == 1) { image = (MagickImage)magickImageCollection.FirstOrDefault(); }
Can someone explain me what is happening there in the magickImageCollection.Flatten with this tiff ?
we use magickImageCollection.Flatten to extract all images,
without problem even when the collection has only one frame
Thanks,
Luc
Beta Was this translation helpful? Give feedback.
All reactions