diff --git a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Component.cs b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Component.cs
index d49b1b4812..97c1401207 100644
--- a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Component.cs
+++ b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Component.cs
@@ -12,6 +12,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components
///
internal class Component : IDisposable
{
+#pragma warning disable SA1401
///
/// Gets or sets the output
///
diff --git a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Frame.cs b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Frame.cs
index 4fdb5cd3b3..2398b8c01b 100644
--- a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Frame.cs
+++ b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/Frame.cs
@@ -5,8 +5,6 @@ using System;
namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components
{
- using SixLabors.ImageSharp.Memory;
-
///
/// Represent a single jpeg frame
///
@@ -100,6 +98,5 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components
component.Init();
}
}
-
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/FrameComponent.cs b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/FrameComponent.cs
index bfc5c7c8b4..8383f54549 100644
--- a/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/FrameComponent.cs
+++ b/src/ImageSharp/Formats/Jpeg/PdfJsPort/Components/FrameComponent.cs
@@ -2,27 +2,36 @@
// Licensed under the Apache License, Version 2.0.
using System;
+using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components
{
- using System.Runtime.CompilerServices;
-
///
/// Represents a single frame component
///
internal class FrameComponent : IDisposable
{
- #pragma warning disable SA1401 // Fields should be private
+#pragma warning disable SA1401 // Fields should be private
+
+ public FrameComponent(Frame frame, byte id, int horizontalFactor, int verticalFactor, byte quantizationIdentifier)
+ {
+ this.Frame = frame;
+ this.Id = id;
+ this.HorizontalFactor = horizontalFactor;
+ this.VerticalFactor = verticalFactor;
+ this.QuantizationIdentifier = quantizationIdentifier;
+ }
+
///
/// Gets the component Id
///
public byte Id { get; }
///
- /// TODO: What does pred stand for?
+ /// Gets or sets Pred TODO: What does pred stand for?
///
- public int Pred;
+ public int Pred { get; set; }
///
/// Gets the horizontal sampling factor.
@@ -40,45 +49,36 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort.Components
public byte QuantizationIdentifier { get; }
///
- /// Gets or sets the block data
+ /// Gets the block data
///
- public Buffer BlockData;
+ public Buffer BlockData { get; private set; }
///
- /// Gets or sets the number of blocks per line
+ /// Gets the number of blocks per line
///
- public int BlocksPerLine;
+ public int BlocksPerLine { get; private set; }
///
- /// Gets or sets the number of blocks per column
+ /// Gets the number of blocks per column
///
- public int BlocksPerColumn;
+ public int BlocksPerColumn { get; private set; }
///
- /// Gets the index for the DC Huffman table
+ /// Gets or sets the index for the DC Huffman table
///
- public int DCHuffmanTableId;
+ public int DCHuffmanTableId { get; set; }
///
- /// Gets the index for the AC Huffman table
+ /// Gets or sets the index for the AC Huffman table
///
- public int ACHuffmanTableId;
+ public int ACHuffmanTableId { get; set; }
- internal int BlocksPerLineForMcu;
+ internal int BlocksPerLineForMcu { get; private set; }
- internal int BlocksPerColumnForMcu;
+ internal int BlocksPerColumnForMcu { get; private set; }
public Frame Frame { get; }
- public FrameComponent(Frame frame, byte id, int horizontalFactor, int verticalFactor, byte quantizationIdentifier)
- {
- this.Frame = frame;
- this.Id = id;
- this.HorizontalFactor = horizontalFactor;
- this.VerticalFactor = verticalFactor;
- this.QuantizationIdentifier = quantizationIdentifier;
- }
-
///
public void Dispose()
{
diff --git a/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
index 95adb70fb9..3357d03874 100644
--- a/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/PdfJsPort/JpegDecoderCore.cs
@@ -38,20 +38,12 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort
private HuffmanTables acHuffmanTables;
- internal Frame Frame;
-
private ComponentBlocks components;
private JpegPixelArea pixelArea;
private ushort resetInterval;
- internal int ImageWidth { get; private set; }
-
- internal int ImageHeight { get; private set; }
-
- internal int NumberOfComponents { get; private set; }
-
///
/// Whether the image has a EXIF header
///
@@ -86,6 +78,26 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.PdfJsPort
this.IgnoreMetadata = options.IgnoreMetadata;
}
+ ///
+ /// Gets the frame
+ ///
+ public Frame Frame { get; private set; }
+
+ ///
+ /// Gets the image width
+ ///
+ public int ImageWidth { get; private set; }
+
+ ///
+ /// Gets the image height
+ ///
+ public int ImageHeight { get; private set; }
+
+ ///
+ /// Gets the number of components
+ ///
+ public int NumberOfComponents { get; private set; }
+
///
/// Gets the input stream.
///