From 490d4a0c2db8710ba24b9b1c353125c5eb3b005b Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Sun, 15 Mar 2026 16:56:04 +0100 Subject: [PATCH] Fix mistake in Identify --- src/ImageSharp/Formats/Exr/ExrDecoderCore.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Exr/ExrDecoderCore.cs b/src/ImageSharp/Formats/Exr/ExrDecoderCore.cs index 7d74b54251..533cff2fc9 100644 --- a/src/ImageSharp/Formats/Exr/ExrDecoderCore.cs +++ b/src/ImageSharp/Formats/Exr/ExrDecoderCore.cs @@ -75,10 +75,19 @@ internal sealed class ExrDecoderCore : ImageDecoderCore /// private ExrCompressionType Compression { get; set; } + /// + /// Gets or sets the image data type, either RGB, RGBA or gray. + /// private ExrImageDataType ImageDataType { get; set; } + /// + /// Gets or sets the image type, either ScanLine or tiled. + /// private ExrImageType ImageType { get; set; } + /// + /// Gets or sets the header attributes. + /// private ExrHeaderAttributes HeaderAttributes { get; set; } /// @@ -134,7 +143,6 @@ internal sealed class ExrDecoderCore : ImageDecoderCore using ExrBaseDecompressor decompressor = ExrDecompressorFactory.Create(this.Compression, this.memoryAllocator, bytesPerBlock, width, height, rowsPerBlock, channelCount); - TPixel color = default; for (uint y = 0; y < height; y += rowsPerBlock) { ulong rowOffset = this.ReadUnsignedLong(stream); @@ -368,7 +376,7 @@ internal sealed class ExrDecoderCore : ImageDecoderCore int bitsPerPixel = this.CalculateBitsPerPixel(); - return new ImageInfo(new Size((int)header.ScreenWindowWidth, (int)header.AspectRatio), this.metadata); + return new ImageInfo(new Size(header.DataWindow.XMax, header.DataWindow.YMax), this.metadata); } private int CalculateBitsPerPixel()