|
893 | 893 | <param name="alphaThresholdPercent">A real number in the range 0 through 100 that specifies which pixels in the source bitmap will map to the transparent color in the converted bitmap.</param>
|
894 | 894 | <summary>Converts the bitmap to the specified <paramref name="format" /> using the given <paramref name="ditherType" />. The original pixel data is replaced with the new format.</summary>
|
895 | 895 | <remarks>
|
896 |
| - <para>For <paramref name="format" />, <see cref="F:System.Drawing.Imaging.PixelFormat.Format16bppGrayScale" /> is not supported.</para> |
897 |
| - <para>For <paramref name="ditherType" />, pass <see cref="F:System.Drawing.Imaging.DitherType.None" /> when the conversion does not reduce the bit depth of the pixel data. This must be <see cref="F:System.Drawing.Imaging.DitherType.Solid" /> or <see cref="F:System.Drawing.Imaging.DitherType.ErrorDiffusion" /> if the <paramref name="paletteType" /> is <see cref="F:System.Drawing.Imaging.PaletteType.Custom" /> or <see cref="F:System.Drawing.Imaging.PaletteType.FixedBlackAndWhite" />.</para> |
| 896 | + <para> |
| 897 | + For <paramref name="format" />, <see cref="F:System.Drawing.Imaging.PixelFormat.Format16bppGrayScale" /> is not supported. |
| 898 | + </para> |
| 899 | + <para> |
| 900 | + For <paramref name="ditherType" />, pass <see cref="F:System.Drawing.Imaging.DitherType.None" /> when the conversion does not reduce the bit depth of the pixel data. |
| 901 | + This must be <see cref="F:System.Drawing.Imaging.DitherType.Solid" /> or <see cref="F:System.Drawing.Imaging.DitherType.ErrorDiffusion" /> if the <paramref name="paletteType" /> is |
| 902 | + <see cref="F:System.Drawing.Imaging.PaletteType.Custom" /> or <see cref="F:System.Drawing.Imaging.PaletteType.FixedBlackAndWhite" />. |
| 903 | + </para> |
898 | 904 | <para>
|
899 | 905 | <paramref name="paletteType" /> is ignored for non-indexed pixel formats.
|
900 | 906 | </para>
|
901 |
| - <para>The <paramref name="palette" /> (called the actual palette) does not have to have the type specified by the <paramref name="paletteType" /> parameter. The <paramref name="paletteType" /> parameter specifies a standard palette that can be used by any of the ordered or spiral dithering algorithms. If the actual palette has a type other than that specified by the <paramref name="paletteType" /> parameter, then <see cref="M:System.Drawing.Bitmap.ConvertFormat(System.Drawing.Imaging.PixelFormat,System.Drawing.Imaging.DitherType,System.Drawing.Imaging.PaletteType,System.Drawing.Imaging.ColorPalette,System.Single)" /> performs a nearest-color conversion from the standard palette to the actual palette.</para> |
902 |
| - <para>For <paramref name="alphaThresholdPercent">, a value of 0 specifies that none of the source pixels map to the transparent color. A value of 100 specifies that any pixel that is not fully opaque will map to the transparent color. A value of t specifies that any source pixel less than t percent of fully opaque will map to the transparent color. Note that for the alpha threshold to be effective, the palette must have a transparent color. If the palette does not have a transparent color, pixels with alpha values below the threshold will map to color that most closely matches <c>(0, 0, 0, 0)</c>, usually black.</para> |
| 907 | + <para> |
| 908 | + The <paramref name="palette" /> (called the actual palette) does not have to have the type specified by the <paramref name="paletteType" /> parameter. |
| 909 | + The <paramref name="paletteType" /> parameter specifies a standard palette that can be used by any of the ordered or spiral dithering algorithms. |
| 910 | + If the actual palette has a type other than that specified by the <paramref name="paletteType" /> parameter, |
| 911 | + then <see cref="M:System.Drawing.Bitmap.ConvertFormat(System.Drawing.Imaging.PixelFormat,System.Drawing.Imaging.DitherType,System.Drawing.Imaging.PaletteType,System.Drawing.Imaging.ColorPalette,System.Single)" /> |
| 912 | + performs a nearest-color conversion from the standard palette to the actual palette. |
| 913 | + </para> |
| 914 | + <para> |
| 915 | + For <paramref name="alphaThresholdPercent">, a value of 0 specifies that none of the source pixels map to the transparent color. |
| 916 | + A value of 100 specifies that any pixel that is not fully opaque will map to the transparent color. |
| 917 | + A value of t specifies that any source pixel less than t percent of fully opaque will map to the transparent color. |
| 918 | + Note that for the alpha threshold to be effective, the palette must have a transparent color. If the palette does not have a transparent color, |
| 919 | + pixels with alpha values below the threshold will map to color that most closely matches <c>(0, 0, 0, 0)</c>, usually black. |
| 920 | + </para> |
903 | 921 | <para>
|
904 | 922 | <paramref name="paletteType" /> and <paramref name="palette" /> really only have relevance with indexed pixel formats. You can pass a <see cref="T:System.Drawing.Imaging.ColorPalette" /> for non-indexed pixel formats, but it has no impact on the transformation and will effective just call <see cref="P:System.Drawing.Image.Palette" /> to set the palette when the conversion is complete.
|
905 | 923 | </para>
|
906 |
| - </remarks> |
| 924 | + </remarks> |
907 | 925 | </Docs>
|
908 | 926 | </Member>
|
909 | 927 | <Member MemberName="FromHicon">
|
|
0 commit comments