/// <summary> /// Checks for encryption. /// </summary> /// <param name="pixelColor">Color of the pixel.</param> /// <returns> /// Encrypted if LSB == 0, Unencrypted otherwise /// </returns> public static EncryptionType CheckForEncryption(Color pixelColor) { if (PixelUtilities.GetLeastSignificantBit(pixelColor.R) != ImageConstants.MinRgbValue) { return(EncryptionType.Encrypted); } return(EncryptionType.Unencrypted); }
private void setPixelToMonochromeColor(byte[] pixels, Color hiddenPixelColor, int i, int j) { if (PixelUtilities.GetLeastSignificantBit(hiddenPixelColor.B) == ImageConstants.MinRgbValue) { this.setPixelBlack(pixels, i, j); } else { this.setPixelWhite(pixels, i, j); } }
/// <summary> /// Determines whether this instance is text. /// </summary> /// <param name="pixelColor">Color of the pixel.</param> /// <returns> /// <c>true</c> if this instance is text; otherwise, <c>false</c>. /// </returns> public static bool CheckFileType(Color pixelColor) { return(PixelUtilities.GetLeastSignificantBit(pixelColor.B) != ImageConstants.MinRgbValue); }