ImageGear Professional DLL v18.1 for Windows
IG_IP_encrypt
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_encrypt

Glossary Item Box

This function scrambles an image bitmap, or a rectangular portion thereof.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_encrypt (
        HIGEAR hIGear, 
        LPAT_RECT lpRect, 
        AT_MODE nEncryptType, 
        const LPSTR lpszPassword 
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image to be encoded.
lpRect LPAT_RECT Far pointer to an AT_RECT struct specifying the rectangular portion of the image to encode. Set = NULL for the whole image.
nEncrptyType AT_MODE An IG_ENCRYPT_METHOD_ constant specifying the method to be used. See file accucnst.h for IG_ENCRYPT_METHOD_ constants available.
lpszPassword const LPSTR Far pointer to your zero-terminated password string.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

FlashPix

Example:

  Copy Code
HIGEAR hIGear;
/* Encrypt the whole hIGear image by method A & with "Top Secret" password   */ 
IG_IP_encrypt ( hIGear, NULL, IG_ENCRYPT_METHOD_A, "Top Secret" );

Remarks:

Your password is also stored. To later decode the image using IG_IP_decrypt(), you will need to know both the encryption method and the password used in this call.

This function cannot take a non-rectangular ROI for its AT_RECT parameter.

©2014. Accusoft Corporation. All Rights Reserved.