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()