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? |
Answered by
JimBobSquarePants
Apr 18, 2026
Replies: 1 comment 3 replies
|
Are you able to share the image? |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should actually be able to get some information out of that image. I'll convert this into an issue and post a fix.