Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 /// <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);
 }