This function saves raster image data in TIFF format as raw image data.

[C++Builder]   BOOL IKTiffFileSaveMem(HANDLE InHandle, HANDLE *OutHandle, int Type, int Color, BOOL Append, LPCSTR Comment, BOOL OneStrip, IKPROCESSPROC UserProc, LPCTSTR Caption, LPCTSTR Message, LPCTSTR Button);
[Delphi]   function IKTiffFileSaveMem(InHandle: THandle; var OutHandle: THandle; Type_, Color: Integer; Append: LongBool; Comment: PChar; OneStrip: LongBool; UserProc: Longint; Caption, Message, Button: PChar): LongBool;

Parameters

Name Explanation
InHandle The image handle of the raster image
OutHandle The raw image data to be saved
Type The type of the file to be saved
0: Uncompressed   1: CCITTRLE   2: GROUP3 1D   3: GROUP3 2D   4: GROUP4   5: PACKBITS   6: LZW  7: JPEG
Color

When Type parameter is 0, 5, or 6 and image is 24bit or 32 bit, then set this parameter to 0: RGB or 1: CMYK

When Type parameter is 7, set the JPEG quality (from 0 to 100) in this parameter. Default is 75.

For all other instances, this parameter is disabled.

Append Sets whether or not images can be saved at the end of the image file(False (0): Cannot be appended, True (nonzero): Can be appended)
Comment The comment text to be saved (MAX:1023 bytes)
Set as follows:[Document + 0x0d + Description + EEE + 0x0d]
   Document:   Document name 
   Description:  Description of the image 
   Page:           Page name 
   Software:     Software 
   DateTime:    Date time 
   Artist:          The author of the image
Note: In Delphi replace the above 0x with $.
OneStrip Sets whether or not a TIFF image is saved as one strip or multiple strips. (False (0): Multiple strips, True (nonzero): One strip)
UserProc The address of the user function (If not using the user function then set to 0)
Caption Sets the text displayed in the title bar of the progress dialog box
Message Sets the message displayed in the progress dialog box
Button Sets the name of the button displayed in the progress dialog box

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The IKTiffFileSaveMem function saves raster image data in TIFF format as raw image data. Supports 1, 4, 8, 16, 24 and 32 bit color (doesn't support 16 bit grayscale). This differs depending on the compression mode used. If the saved image is 24 or 32 bit color and the Type parameter is 0, 5, or 6, then the Color parameter can support values of 0 (RGB) or 1 (CMYK). If the Color parameter is 1 (CMYK) then the output file will have a bit count of 32. If the Type parameter is 7 (JPEG Compression), then set the JPEG Quality value in the Color parameter (from 0 to 100, default value is 75). The OneStrip parameter is enabled for all types of TIFF images except GROUP4 (GROUP4 is always one strip).

If the user function is set or if the Caption, Message, and Button parameters are blank then the Progress dialog box is not displayed. If the Progress dialog box is displayed, it indicates the percentage of the current process completed. For more information about the user function please refer to the Definition of User Function in the Ik10File.dll, Ik10FileA.dll, Ik10File64.dll, Ik10File64A.dll section.

Note: TIFF-GROUP3-1D is the same as MH format. TIFF-GROUP3-2D is the same as MR format. TIFF-GROUP4 is the same as MMR format. When saving 16 bit images in TIFF-Uncompressed, PACKBITS, and LZW formats, the image is converted to 24 bits.

Except for the fact that the raster image is saved as raw image data, this function operates in the same way as the IKTiffFileSave function.

 

The ImageKit10 VCL is a product created by Newtone Corporation