Bitmap.ConvertFormat Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ConvertFormat(PixelFormat) | |
ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette, Single) |
ConvertFormat(PixelFormat)
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
Note
To use this preview API, you must enable preview features in your project by setting the EnablePreviewFeatures
property to True
in your project file. For more information, see https://aka.ms/dotnet-preview-features.
public:
void ConvertFormat(System::Drawing::Imaging::PixelFormat format);
[System.Runtime.Versioning.RequiresPreviewFeatures]
public void ConvertFormat (System.Drawing.Imaging.PixelFormat format);
[<System.Runtime.Versioning.RequiresPreviewFeatures>]
member this.ConvertFormat : System.Drawing.Imaging.PixelFormat -> unit
Public Sub ConvertFormat (format As PixelFormat)
Parameters
- format
- PixelFormat
- Attributes
Applies to
ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette, Single)
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
Note
To use this preview API, you must enable preview features in your project by setting the EnablePreviewFeatures
property to True
in your project file. For more information, see https://aka.ms/dotnet-preview-features.
[System.Runtime.Versioning.RequiresPreviewFeatures]
public void ConvertFormat (System.Drawing.Imaging.PixelFormat format, System.Drawing.Imaging.DitherType ditherType, System.Drawing.Imaging.PaletteType paletteType = System.Drawing.Imaging.PaletteType.Custom, System.Drawing.Imaging.ColorPalette? palette = default, float alphaThresholdPercent = 0);
[<System.Runtime.Versioning.RequiresPreviewFeatures>]
member this.ConvertFormat : System.Drawing.Imaging.PixelFormat * System.Drawing.Imaging.DitherType * System.Drawing.Imaging.PaletteType * System.Drawing.Imaging.ColorPalette * single -> unit
Public Sub ConvertFormat (format As PixelFormat, ditherType As DitherType, Optional paletteType As PaletteType = System.Drawing.Imaging.PaletteType.Custom, Optional palette As ColorPalette = Nothing, Optional alphaThresholdPercent As Single = 0)
Parameters
- format
- PixelFormat
- ditherType
- DitherType
- paletteType
- PaletteType
- palette
- ColorPalette
- alphaThresholdPercent
- Single
- Attributes
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈