50 references to PaletteType
System.Drawing.Common (15)
GlobalUsings.cs (1)
39
global using PaletteType = System.Drawing.Imaging.
PaletteType
;
System\Drawing\Bitmap.cs (6)
402
/// is <see cref="
PaletteType
.Custom"/> or <see cref="
PaletteType
.FixedBlackAndWhite"/>.
420
/// <see cref="ConvertFormat(PixelFormat, DitherType,
PaletteType
, ColorPalette?, float)"/> performs a nearest-color
449
PaletteType
paletteType =
PaletteType
.Custom,
510
ConvertFormat(format, DitherType.ErrorDiffusion,
PaletteType
.Custom, palette, .25f);
System\Drawing\Imaging\ColorPalette.cs (4)
46
public ColorPalette(
PaletteType
fixedPaletteType)
56
/// <inheritdoc cref="InitializePalette(
PaletteType
, int, bool, IPointer{GpBitmap}?)"/>
58
InitializePalette((
PaletteType
)GdiPlus.PaletteType.PaletteTypeOptimal, colors, useTransparentColor, bitmap);
96
PaletteType
fixedPaletteType,
System\Drawing\Imaging\DitherType.cs (4)
16
/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType,
PaletteType
, ColorPalette?, float)"/>
17
/// method. This algorithm can be used with any palette other than <see cref="
PaletteType
.Custom"/>.
24
/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType,
PaletteType
, ColorPalette?, float)"/> method.
67
/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType,
PaletteType
, ColorPalette?, float)"/> method.
System.Drawing.Common.Tests (35)
System\Drawing\BitmapTests.cs (35)
1605
public static TheoryData<PixelFormat, DitherType,
PaletteType
> Convert_Valid { get; } = new()
1608
{ PixelFormat.Format16bppArgb1555, DitherType.None,
PaletteType
.FixedHalftone8 },
1609
{ PixelFormat.Format16bppRgb555, DitherType.Spiral8x8,
PaletteType
.FixedHalftone8 },
1610
{ PixelFormat.Format16bppRgb565, DitherType.Ordered8x8,
PaletteType
.FixedHalftone8 },
1611
{ PixelFormat.Format24bppRgb, DitherType.Ordered4x4,
PaletteType
.FixedHalftone8 },
1612
{ PixelFormat.Format32bppArgb, DitherType.DualSpiral4x4,
PaletteType
.FixedHalftone8 },
1613
{ PixelFormat.Format32bppPArgb, DitherType.ErrorDiffusion,
PaletteType
.FixedHalftone8 },
1614
{ PixelFormat.Format32bppRgb, DitherType.Solid,
PaletteType
.FixedHalftone8 },
1615
{ PixelFormat.Format16bppArgb1555, DitherType.None,
PaletteType
.FixedHalftone256 },
1616
{ PixelFormat.Format16bppRgb555, DitherType.DualSpiral8x8,
PaletteType
.FixedHalftone256 },
1617
{ PixelFormat.Format16bppRgb565, DitherType.None,
PaletteType
.FixedHalftone256 },
1618
{ PixelFormat.Format24bppRgb, DitherType.None,
PaletteType
.FixedHalftone256 },
1619
{ PixelFormat.Format32bppArgb, DitherType.None,
PaletteType
.FixedHalftone256 },
1620
{ PixelFormat.Format32bppPArgb, DitherType.None,
PaletteType
.FixedHalftone256 },
1621
{ PixelFormat.Format32bppRgb, DitherType.None,
PaletteType
.FixedHalftone256 },
1622
{ PixelFormat.Format16bppRgb565, DitherType.None, (
PaletteType
)(-1) },
1625
public static TheoryData<PixelFormat, DitherType,
PaletteType
> Convert_InvalidArgument { get; } = new()
1628
{ PixelFormat.Format1bppIndexed, (DitherType)(-1),
PaletteType
.FixedHalftone256 },
1629
{ PixelFormat.Format1bppIndexed, DitherType.None, (
PaletteType
)(-1) },
1630
{ PixelFormat.Format1bppIndexed, (DitherType)(-1), (
PaletteType
)(-1) },
1631
{ PixelFormat.Format1bppIndexed, DitherType.None,
PaletteType
.FixedHalftone256 },
1632
{ PixelFormat.Format1bppIndexed, DitherType.ErrorDiffusion,
PaletteType
.FixedHalftone8 },
1633
{ PixelFormat.Format4bppIndexed, DitherType.Solid,
PaletteType
.FixedHalftone64 },
1634
{ PixelFormat.Format4bppIndexed, DitherType.None,
PaletteType
.FixedHalftone8 },
1635
{ PixelFormat.Format4bppIndexed, DitherType.ErrorDiffusion,
PaletteType
.FixedHalftone8 },
1636
{ PixelFormat.Format8bppIndexed, DitherType.None,
PaletteType
.FixedHalftone256 },
1637
{ PixelFormat.Format8bppIndexed, DitherType.Solid,
PaletteType
.FixedHalftone27 },
1639
{ PixelFormat.Format16bppGrayScale, DitherType.None,
PaletteType
.FixedHalftone256 },
1640
{ PixelFormat.Format16bppGrayScale, DitherType.ErrorDiffusion,
PaletteType
.FixedHalftone8 },
1641
{ PixelFormat.Format16bppGrayScale, DitherType.None,
PaletteType
.FixedBlackAndWhite },
1642
{ PixelFormat.Format16bppGrayScale, DitherType.Solid,
PaletteType
.FixedBlackAndWhite },
1643
{ PixelFormat.Format16bppRgb565, (DitherType)(-1),
PaletteType
.FixedHalftone256 },
1644
{ PixelFormat.Format16bppRgb565, (DitherType)(-1), (
PaletteType
)(-1) },
1649
public void Bitmap_Convert_BasicPixelFormat(PixelFormat format, DitherType dither,
PaletteType
palette)
1658
public void Bitmap_Convert_ArgumentException(PixelFormat format, DitherType dither,
PaletteType
palette)