You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/MagicScaler/Core/Enums.cs
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,9 @@ public enum HybridScaleMode
50
50
/// <summary>Defines the modes that control <a href="http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/">gamma correction</a> in pixel blending.</summary>
51
51
publicenumGammaMode
52
52
{
53
-
/// <summary>Convert values to linear RGB before blending.</summary>
53
+
/// <summary>Convert values to linear RGB before blending. This is more mathematically correct and more visually pleasing in most cases.</summary>
/// <summary>Blend gamma-companded R'G'B' values directly. This is usually a poor choice but may be used for compatibility with other software or where speed is more important than image quality.</summary>
56
56
Companded,
57
57
/// <summary>Same as <see cref="Companded" />.</summary>
58
58
[Obsolete("Replaced by "+nameof(GammaMode)+"."+nameof(Companded),true),EditorBrowsable(EditorBrowsableState.Never)]
@@ -86,6 +86,7 @@ public enum ColorProfileMode
86
86
/// <summary>Convert the input image to the <a href="https://en.wikipedia.org/wiki/SRGB">sRGB color space</a> during processing. Output an untagged sRGB image.</summary>
87
87
Normalize,
88
88
/// <summary>Convert the input image to the <a href="https://en.wikipedia.org/wiki/SRGB">sRGB color space</a> during processing. Embed a compact sRGB profile in the output.</summary>
89
+
/// <remarks>This option ensures maximum compatibility with web browsers and other software but results in slightly larger (+456 bytes) output files.</remarks>
89
90
NormalizeAndEmbed,
90
91
/// <summary>Preserve the input image color space during processing. Embed the ICC profile in the output image. If the output format does not support embedded profiles, it will be discarded.</summary>
91
92
Preserve,
@@ -117,11 +118,11 @@ public enum Orientation
117
118
/// <summary>Defines the modes that control <a href="https://magnushoff.com/jpeg-orientation.html">Exif Orientation</a> correction.</summary>
118
119
publicenumOrientationMode
119
120
{
120
-
/// <summary>Correct the image orientation according to the Exif tag on load. Save the output in normal orientation.</summary>
121
+
/// <summary>Correct the image orientation according to the Exif tag on load. Save the output in normal orientation. This option ensures maximum compatibility with viewer software.</summary>
121
122
Normalize,
122
123
/// <summary>Preserve the orientation of the input image and tag the output image to reflect the orientation. If the output format does not support orientation tagging, it will be discarded.</summary>
123
124
Preserve,
124
-
/// <summary>Ignore any orientation tag and treat the image as if its stored orientation is normal. Do not tag the output image.</summary>
125
+
/// <summary>Ignore any orientation tag and treat the image as if its stored orientation is normal. Do not tag the output image. This option should only be used if the Exif orientation of the input image is known to be incorrect.</summary>
Copy file name to clipboardExpand all lines: src/MagicScaler/Core/Interfaces.cs
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,29 +26,35 @@ public interface IPixelSource
26
26
/// <summary>A single image frame within an <see cref="IImageContainer" /></summary>
27
27
publicinterfaceIImageFrame:IDisposable
28
28
{
29
-
/// <summary>The horizontal resolution of the image frame, in dots/pixels per inch. If the frame source has no resolution information, a default value of 72 or 96 is suitable.</summary>
29
+
/// <summary>The horizontal resolution of the image frame, in dots/pixels per inch.</summary>
30
+
/// <remarks>Implementation note: If the frame source has no resolution information, a default value of 72 or 96 is suitable.</remarks>
30
31
doubleDpiX{get;}
31
32
32
-
/// <summary>The vertical resolution of the image frame, in dots/pixels per inch. If the frame source has no resolution information, a default value of 72 or 96 is suitable.</summary>
33
+
/// <summary>The vertical resolution of the image frame, in dots/pixels per inch.</summary>
34
+
/// <remarks>Implementation note: If the frame source has no resolution information, a default value of 72 or 96 is suitable.</remarks>
33
35
doubleDpiY{get;}
34
36
35
-
/// <summary>The <see cref="Orientation"/> of the image frame. If the frame source has no orientation information, a default value of <see cref="Orientation.Normal"/> is suitable.</summary>
37
+
/// <summary>The <see cref="Orientation"/> of the image frame.</summary>
38
+
/// <remarks>Implementation note: If the frame source has no orientation information, a default value of <see cref="Orientation.Normal"/> is suitable.</remarks>
36
39
OrientationExifOrientation{get;}
37
40
38
-
/// <summary>The <a href="https://en.wikipedia.org/wiki/ICC_profile">ICC color profile</a> that describes the color space of the image frame. If this value is <see cref="ReadOnlySpan{T}.Empty" />, colors will be interpreted as <a href="https://en.wikipedia.org/wiki/SRGB">sRGB or sYCC</a>.</summary>
41
+
/// <summary>The <a href="https://en.wikipedia.org/wiki/ICC_profile">ICC color profile</a> that describes the color space of the image frame.</summary>
42
+
/// <remarks>If this value is <see cref="ReadOnlySpan{T}.Empty" />, colors will be interpreted as <a href="https://en.wikipedia.org/wiki/SRGB">sRGB or sYCC</a>.</remarks>
39
43
ReadOnlySpan<byte>IccProfile{get;}
40
44
41
45
/// <summary>The <see cref="IPixelSource" /> to retrieve pixels from this image frame.</summary>
42
46
IPixelSourcePixelSource{get;}
43
47
}
44
48
45
49
/// <summary>An image frame within an <see cref="IImageContainer" />. The frame exposes 3 <see cref="IPixelSource" /> values, representing the Y', Cb, and Cr planes.</summary>
50
+
/// <remarks>Implementation note: The <see cref="PixelSource" /> property should return the Y (luma) plane.</remarks>
46
51
publicinterfaceIYccImageFrame:IImageFrame
47
52
{
48
53
/// <summary>The position of subsampled chroma components relative to their associated luma components.</summary>
49
54
ChromaPositionChromaPosition{get;}
50
55
51
-
/// <summary>A 3x3 matrix containing the coefficients for converting from R'G'B' to the Y'CbCr format of this image frame. The fourth row and column will be ignored. See <see cref="YccMatrix" /> for standard values.</summary>
56
+
/// <summary>A 3x3 matrix containing the coefficients for converting from R'G'B' to the Y'CbCr format of this image frame.</summary>
57
+
/// <remarks>The fourth row and column will be ignored. See <see cref="YccMatrix" /> for standard values.</remarks>
52
58
Matrix4x4RgbYccMatrix{get;}
53
59
54
60
/// <summary>True if the encoding uses the full 0-255 range for pixel values, false if it uses video range (16-235 luma and 16-240 chroma).</summary>
0 commit comments