Prerequisites
ImageSharp version
3.1.2
Other ImageSharp packages and versions
Environment (Operating system, version and so on)
Windows 11 amd64
.NET Framework version
.NET 8.0
Description
In a project, I have test assets with a CR2 image
Berries.CR2.zip
which windows file explorer provides the preview for:

However, loading this image with ImageSharp fails:
System.NotSupportedException: Missing SOI marker offset for tiff with old jpeg compression
at SixLabors.ImageSharp.Formats.Tiff.TiffThrowHelper.ThrowNotSupported(String message)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoderOptionsParser.ParseCompression(TiffDecoderCore options, Nullable`1 compression, ExifProfile exifProfile)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoderOptionsParser.VerifyAndParse(TiffDecoderCore options, ExifProfile exifProfile, TiffFrameMetadata frameMetadata)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoderCore.DecodeFrame[TPixel](ExifProfile tags, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoderCore.Decode[TPixel](BufferedReadStream stream, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.ImageDecoderUtilities.Decode[TPixel](IImageDecoderInternals decoder, Configuration configuration, Stream stream, Func`3 largeImageExceptionFactory, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.ImageDecoderUtilities.Decode[TPixel](IImageDecoderInternals decoder, Configuration configuration, Stream stream, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoder.Decode[TPixel](DecoderOptions options, Stream stream, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.Tiff.TiffDecoder.Decode(DecoderOptions options, Stream stream, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Formats.ImageDecoder.<>c__DisplayClass3_0.<DecodeAsync>b__0(Stream s, CancellationToken ct)
at SixLabors.ImageSharp.Formats.ImageDecoder.<>c__DisplayClass12_0`1.<WithSeekableMemoryStreamAsync>g__PeformActionAndResetPosition|0(Stream s, Int64 position, CancellationToken ct)
--- End of stack trace from previous location ---
at SixLabors.ImageSharp.Formats.ImageDecoder.DecodeAsync(DecoderOptions options, Stream stream, CancellationToken cancellationToken)
at SixLabors.ImageSharp.Image.WithSeekableStreamAsync[T](DecoderOptions options, Stream stream, Func`3 action, CancellationToken cancellationToken)
I couldn't find much information whether or not Canon's CR2 support is deliberately left out.
|
| crs:RawFileName="IMG_2443.CR2" |
suggests it might not be intentional. Opening this issue just in case. :)
Steps to Reproduce
using Image berries = await Image.LoadAsync(@"C:\temp\Berries.CR2");
Images
Berries.CR2.zip
Prerequisites
DEBUGandRELEASEmodeImageSharp version
3.1.2
Other ImageSharp packages and versions
Environment (Operating system, version and so on)
Windows 11 amd64
.NET Framework version
.NET 8.0
Description
In a project, I have test assets with a CR2 image
Berries.CR2.zip
which windows file explorer provides the preview for:
However, loading this image with ImageSharp fails:
I couldn't find much information whether or not Canon's CR2 support is deliberately left out.
ImageSharp/tests/Images/Input/Jpg/baseline/JpegSnoopReports/Lake.jpg.txt
Line 162 in 1f22bce
Steps to Reproduce
Images
Berries.CR2.zip