-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Update System.Drawing to reflect GDI+ changes #32873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,21 @@ public sealed class Encoder | |
| public static readonly Encoder ChrominanceTable = new Encoder(new Guid(unchecked((int)0xf2e455dc), unchecked((short)0x09b3), unchecked((short)0x4316), new byte[] { 0x82, 0x60, 0x67, 0x6a, 0xda, 0x32, 0x48, 0x1c })); | ||
| public static readonly Encoder SaveFlag = new Encoder(new Guid(unchecked((int)0x292266fc), unchecked((short)0xac40), unchecked((short)0x47bf), new byte[] { 0x8c, 0xfc, 0xa8, 0x5b, 0x89, 0xa6, 0x55, 0xde })); | ||
|
|
||
| /// <summary> | ||
| /// An <see cref="Encoder" /> object that is initialized with the globally unique identifier for the color space category. | ||
| /// </summary> | ||
| public static readonly Encoder ColorSpace = new Encoder(new Guid(unchecked((int)0xae7a62a0), unchecked((short)0xee2c), unchecked((short)0x49d8), new byte[] { 0x9d, 0x07, 0x1b, 0xa8, 0xa9, 0x27, 0x59, 0x6e })); | ||
|
|
||
| /// <summary> | ||
| /// An <see cref="Encoder" /> object that is initialized with the globally unique identifier for the image items category. | ||
| /// </summary> | ||
| public static readonly Encoder ImageItems = new Encoder(new Guid(unchecked((int)0x63875e13), unchecked((short)0x1f1d), unchecked((short)0x45ab), new byte[] { 0x91, 0x95, 0xa2, 0x9b, 0x60, 0x66, 0xa6, 0x50 })); | ||
|
|
||
| /// <summary> | ||
| /// An <see cref="Encoder" /> object that is initialized with the globally unique identifier for the save as CMYK category. | ||
| /// </summary> | ||
| public static readonly Encoder SaveAsCmyk = new Encoder(new Guid(unchecked((int)0xa219bbc9), unchecked((short)0x0a9d), unchecked((short)0x4005), new byte[] { 0xa3, 0xee, 0x3a, 0x42, 0x1b, 0x8b, 0xb0, 0x6c })); | ||
|
||
|
|
||
| private Guid _guid; | ||
|
|
||
| public Encoder(Guid guid) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,6 +157,23 @@ public static IEnumerable<object[]> GetEncoderParameterList_ReturnsExpected_Test | |
| new Guid(unchecked((int)0xa219bbc9), unchecked((short)0x0a9d), unchecked((short)0x4005), new byte[] { 0xa3, 0xee, 0x3a, 0x42, 0x1b, 0x8b, 0xb0, 0x6c }) /* Encoder.SaveAsCmyk.Guid */ | ||
| } | ||
| }; | ||
|
|
||
| #if !NETFRAMEWORK | ||
|
||
| // NetFX doesn't support pointer-type encoder parameters, and doesn't define Encoder.ImageItems. Skip this test | ||
| // on NetFX. | ||
| yield return new object[] | ||
| { | ||
| ImageFormat.Jpeg, | ||
| new Guid[] | ||
| { | ||
| Encoder.Transformation.Guid, | ||
| Encoder.Quality.Guid, | ||
| Encoder.LuminanceTable.Guid, | ||
| Encoder.ChrominanceTable.Guid, | ||
| Encoder.ImageItems.Guid | ||
| } | ||
| }; | ||
| #endif | ||
| } | ||
|
|
||
| [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we try to use the full name even if it is not needed, but not sure. @carlossanlop ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean using
<see cref="T:System.Drawing.Imaging.Encoder" />? No, it's not needed in triple slash comments. If the API was not recognized within this context, VS would give you an error. But in this case, we recognize theEncodertype.When the project gets built and the triple slash comments get converted to their respective xml files, all API names will be automatically converted to their full name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the
T:prefix results in build errors:error CA1200: Avoid using cref tags with a prefix