Bitmap.ConvertFormat 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| Name | Description |
|---|---|
| ConvertFormat(PixelFormat) |
비트맵을 지정된 으로 변환합니다 |
| ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette, Single) |
지정된 |
ConvertFormat(PixelFormat)
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
비트맵을 지정된 으로 변환합니다 format. 원래 픽셀 데이터는 새 형식으로 대체됩니다.
public:
void ConvertFormat(System::Drawing::Imaging::PixelFormat format);
public void ConvertFormat(System.Drawing.Imaging.PixelFormat format);
member this.ConvertFormat : System.Drawing.Imaging.PixelFormat -> unit
Public Sub ConvertFormat (format As PixelFormat)
매개 변수
- format
- PixelFormat
새 픽셀 형식입니다.
설명
의 경우 format지원 Format16bppGrayScale 되지 않습니다.
적용 대상
ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette, Single)
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
- Source:
- Bitmap.cs
지정된 format을 사용하여 비트맵을 지정된 ditherType 비트맵으로 변환합니다. 원래 픽셀 데이터는 새 형식으로 대체됩니다.
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);
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)
매개 변수
- format
- PixelFormat
새 픽셀 형식입니다.
- ditherType
- DitherType
디더링 알고리즘입니다.
- paletteType
- PaletteType
픽셀 형식이 인덱싱될 때 사용할 색상표 형식입니다.
- palette
- ColorPalette
ColorPalette 변환된 비트맵의 픽셀 데이터에 인덱스가 저장되는 색상표를 지정하는 포인터입니다. 인덱싱된 픽셀 형식에 대해 지정해야 합니다.
- alphaThresholdPercent
- Single
원본 비트맵에서 변환된 비트맵의 투명한 색에 매핑할 픽셀을 지정하는 범위 0에서 100 사이의 실수입니다.
설명
의 경우 format지원 Format16bppGrayScale 되지 않습니다.
의 경우 ditherType변환에서 픽셀 데이터의 비트 깊이를 줄이지 않는 경우 전달 None 합니다. 이 값은 Solid is 또는 ErrorDiffusionFixedBlackAndWhite.인 CustompaletteType 경우여야 합니다.
paletteType 는 인덱싱되지 않은 픽셀 형식에 대해 무시됩니다.
palette (실제 색상표라고 함)에는 매개 변수로 지정된 형식이 paletteType 있을 필요가 없습니다. 매개 변수는 paletteType 정렬된 또는 나선형 디더링 알고리즘에서 사용할 수 있는 표준 색상표를 지정합니다. 실제 색상표에 매개 변수 ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette, Single) 에 paletteType 지정된 형식이 아닌 다른 형식이 있는 경우 표준 색상표에서 실제 색상표로 가장 가까운 색 변환을 수행합니다.
의 경우 alphaThresholdPercent값이 0이면 원본 픽셀이 투명 색에 매핑되지 않음을 지정합니다. 값 100은 완전히 불투명하지 않은 모든 픽셀이 투명한 색에 매핑되도록 지정합니다. t 값은 전체 불투명의 t% 미만의 원본 픽셀이 투명 색에 매핑되도록 지정합니다. 알파 임계값을 적용하려면 색상표에 투명한 색이 있어야 합니다. 색상표에 투명한 색이 없으면 알파 값이 임계값 미만인 픽셀은 일반적으로 검은색과 가장 일치하는 (0, 0, 0, 0)색에 매핑됩니다.
paletteType 실제로 palette 는 인덱싱된 픽셀 형식과의 관련성만 있습니다. 인덱싱되지 않은 픽셀 형식에 대해 전달할 ColorPalette 수 있지만 변환에는 영향을 주지 않으며 변환이 완료되면 색상표를 설정하기 위한 호출 Palette 만 유효합니다.