Example #1
0
 /// <summary>
 /// Are pixel values in this image 16-bit integer?
 /// </summary>
 /// <param name="interpretation">The <see cref="Enums.Interpretation"/></param>
 /// <returns><see langword="true"/> if the pixel values in this image are 16-bit;
 /// otherwise, <see langword="false"/></returns>
 public static bool Is16Bit(Enums.Interpretation interpretation)
 {
     return(interpretation == Enums.Interpretation.Rgb16 ||
            interpretation == Enums.Interpretation.Grey16);
 }
Example #2
0
 /// <summary>
 /// Return the image alpha maximum. Useful for combining alpha bands. scRGB
 /// images are 0 - 1 for image data, but the alpha is 0 - 255.
 /// </summary>
 /// <param name="interpretation">The <see cref="Enums.Interpretation"/></param>
 /// <returns>the image alpha maximum</returns>
 public static int MaximumImageAlpha(Enums.Interpretation interpretation)
 {
     return(Is16Bit(interpretation) ? 65535 : 255);
 }