Detecting "Multiple SOF markers. Only single frame jpegs supported." error without loading image #3117
-
|
Our web service accepts images and stores them for background processing. We use public static bool TryIdentify(Span<byte> imageBytes, out ImageInfo imageInfo)
{
try
{
imageInfo = Image.Identify(imageBytes);
}
catch (Exception e) when (e is NotSupportedException || e is InvalidImageContentException || e is UnknownImageFormatException)
{
imageInfo = null;
return false;
}
return true;
}During background processing we ran across an image that throws the following exception from We're trying to figure out a way we could have rejected this image at upload time and hit a wall. Is there something we can do? Or is this just one of those problems that can only be found by fully decoding the image? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Are you able to share the image? |
Beta Was this translation helpful? Give feedback.
We should actually be able to get some information out of that image. I'll convert this into an issue and post a fix.