sisoIo.h File Reference

sisoIo.h File Reference

Functions to load and store image files. More...

#include "os_type.h"
#include "os_funcs.h"

Go to the source code of this file.

Macros

#define COMPRESSION_CCITT_T4   3
 
#define COMPRESSION_CCITT_T6   4
 
#define COMPRESSION_CCITTFAX3   3
 
#define COMPRESSION_CCITTFAX4   4
 
#define COMPRESSION_CCITTRLE   2
 
#define COMPRESSION_CCITTRLEW   32771
 
#define COMPRESSION_JPEG   7
 
#define COMPRESSION_LZW   5
 
#define COMPRESSION_NEXT   32766
 
#define COMPRESSION_NONE   1
 
#define COMPRESSION_OJPEG   6
 
#define COMPRESSION_PACKBITS   32773
 
#define COMPRESSION_THUNDERSCAN   32809
 
#define dlldir
 
#define IoWriteNextSeqPicture(SeqRef, SeqIndex, Buffer)   IoWriteSeqPicture(SeqRef, SeqIndex, Buffer)
 

Typedefs

typedef char * LPCWSTR
 
typedef void SisoIoImageEngine
 

Functions

dlldir int DEPRECATED (IoReadSeqPicture(void *SeqRef, int SeqIndex, void *buffer))
 
dlldir size_t IoCalculateBufferSize (int width, int height, int bits)
 Calculate the buffer size according to the bit depth This function will return the buffer size for a given image format. For the packed formats (bit depth not a multiple of 8) the assumption is made that a line always starts on a byte boundary and that the last byte of the line will be padded with 0 as necessary. To calculate the buffer size fpr TIFF files, pass bitsPerSample*samplesPerPixel to bits.
 
dlldir int IoCloseAVI (void *AviRef)
 
dlldir int IoCloseBmp (void *bmpHandle)
 
dlldir int IoCloseSeq (void *SeqRef)
 
dlldir int IoConvert1BitTo8BitData (SisoIoImageEngine *handle)
 converts a bitmap in an 8 bit gray image. It normalizes the gray values.
 
dlldir int IoCreateAVIColor (void **AviRef, const char *filename, int width, int height, double fps)
 
dlldir int IoCreateAVIColorW (void **AviRef, const LPCWSTR filename, int width, int height, double fps)
 
dlldir int IoCreateAVIGray (void **AviRef, const char *filename, int width, int height, double fps)
 
dlldir int IoCreateAVIGrayW (void **AviRef, const LPCWSTR filename, int width, int height, double fps)
 
dlldir int IoCreateSeq (void **SeqRef, const char *pFilename, int width, int height, int bitdepth, int flags)
 
dlldir int IoFreeImage (SisoIoImageEngine *handle)
 
dlldir int IoFreeRaw (unsigned char *data)
 
dlldir int IoFreeTiff (unsigned char *data)
 Release the memory resources of previously read image files.
 
dlldir int IoGetBitsPerComponent (const SisoIoImageEngine *handle)
 
dlldir int IoGetBitsPerPixel (const SisoIoImageEngine *handle)
 
dlldir int IoGetHeight (const SisoIoImageEngine *handle)
 
dlldir int IoGetNrOfComponents (const SisoIoImageEngine *handle)
 
dlldir int IoGetSeqInfo (void *SeqRef, int *nrOfImages, int *nrOfLostImages)
 
dlldir int IoGetWidth (const SisoIoImageEngine *handle)
 
dlldir const void * IoImageGetData (const SisoIoImageEngine *handle)
 query the pixel data from an image. The channel order for color images is BLUE GREEN RED.
 
dlldir int IoImageOpen (const char *filename, SisoIoImageEngine **handle)
 open an existing image file. The channel order for color images is BLUE GREEN RED. Supported file formats:
 
dlldir int IoImageOpenEx (const char *filename, SisoIoImageEngine **handle, int RGBSequence)
 open an existing image file
 
dlldir int IoOpenAVI (void **AviRef, const char *fileName, int *width, int *height, int *bitDepth)
 
dlldir SisoIoImageEngineIoOpenImage (const char *filename)
 open an existing image file
 
dlldir SisoIoImageEngineIoOpenImageExt (const char *filename, unsigned char **data, int *width, int *height, int *bits)
 open an existing image file
 
dlldir int IoOpenSeq (void **SeqRef, const char *pFilename, int *width, int *height, int *bitdepth, int flags)
 
dlldir int IoReadAVIPicture (void *AviRef, int PicNr, void *buffer)
 
dlldir void * IoReadBmp (const char *filename, unsigned char **data, int *width, int *height, int *bits)
 Load data from a bitmap file to a memory buffer This functions loads the image data of a bitmap file to a memory buffer. The function allocates the memory buffer according to the detected image information inside the bitmap file and returns the pointer to the memory. In case of colored images, the ordering sequence of the color channels is BGR. Please note, that the image information inside the buffer is starting at the point ( X = 0, Y = 0), which means, that the data of the bitmap file is mirrored along a diagonal line compared to the bitmap format.
 
dlldir int IoReadNextSeqPicture (void *SeqRef, int *PicNr, void *buffer)
 
dlldir int IoReadRaw (const char *filename, unsigned char **data, int *width, int *height, int *bits)
 
dlldir void * IoReadTiff (const char *filename, unsigned char **data, int *width, int *height, int *bitPerSample, int *samplePerPixel)
 Load a TIF file into a memory buffer.
 
dlldir void * IoReadTiffEx (const char *filename, unsigned char **data, int *width, int *height, int *bitPerSample, int *samplePerPixel, int RGBSequence)
 Load a TIF file into a memory buffer (enhanced version).
 
dlldir void * IoReadTiffExW (const LPCWSTR filename, unsigned char **data, int *width, int *height, int *bitPerSample, int *samplePerPixel, int RGBSequence)
 Load a TIF file into a memory buffer.
 
dlldir void * IoReadTiffW (const LPCWSTR filename, unsigned char **data, int *width, int *height, int *bitPerSample, int *samplePerPixel)
 Load a TIF file into a buffer,.
 
dlldir int IoSaveImageExt (const char *filename, void *data, int width, int height, int bits)
 save image to File. The channel order for color images is RED GREEN BLUE. Supported file formats:
 
dlldir int IoSeqCreateAvi (void *SeqRef, const char *aviFilename, int StartSeqIndex, int StopSeqIndex)
 
dlldir int IoWriteAVIPicture (void *AviRef, int PicNr, const void *buffer)
 
dlldir int IoWriteBmp (const char *filename, unsigned char *data, int width, int height, int bits)
 
dlldir int IoWriteBmpW (const LPCWSTR filename, unsigned char *data, int width, int height, int bits)
 
dlldir int IoWriteRaw (const char *filename, unsigned char *data, int width, int height, int bits)
 
dlldir int IoWriteRawW (const LPCWSTR filename, unsigned char *data, int width, int height, int bits)
 
dlldir int IoWriteSeqPicture (void *SeqRef, int PicNr, const void *buffer)
 
dlldir int IoWriteTiff (const char *filename, unsigned char *data, int width, int height, int bitPerSample, int samplePerPixel)
 Save Image data to to a file in TIF format.
 
dlldir int IoWriteTiffCompression (const char *filename, unsigned char *data, int width, int height, int bitPerSample, int samplePerPixel, int compressionFlag)
 
dlldir int IoWriteTiffEx (const char *filename, unsigned char *data, int width, int height, int bitPerSample, int samplePerPixel, int RGBSequence)
 Save Image data to to a file in TIF format.
 
dlldir int IoWriteTiffExW (const LPCWSTR filename, unsigned char *data, int width, int height, int bitPerSample, int samplePerPixel, int RGBSequence)
 Save Image data to to a file in TIF format.
 
dlldir int IoWriteTiffW (const LPCWSTR filename, unsigned char *data, int width, int height, int bitPerSample, int samplePerPixel)
 Save Image data to to a file in TIF format.
 

Detailed Description

Functions to load and store image files.


MicroEnable Io Library Copyright (c) 2021 Basler AG, All Rights Reserved.

This includes code from: LIBTIFF, Version 3.7.4 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.


Author
Basler AG

Macro Definition Documentation

◆ COMPRESSION_CCITT_T4

#define COMPRESSION_CCITT_T4   3

◆ COMPRESSION_CCITT_T6

#define COMPRESSION_CCITT_T6   4

◆ COMPRESSION_CCITTFAX3

#define COMPRESSION_CCITTFAX3   3

◆ COMPRESSION_CCITTFAX4

#define COMPRESSION_CCITTFAX4   4

◆ COMPRESSION_CCITTRLE

#define COMPRESSION_CCITTRLE   2

◆ COMPRESSION_CCITTRLEW

#define COMPRESSION_CCITTRLEW   32771

◆ COMPRESSION_JPEG

#define COMPRESSION_JPEG   7

◆ COMPRESSION_LZW

#define COMPRESSION_LZW   5

◆ COMPRESSION_NEXT

#define COMPRESSION_NEXT   32766

◆ COMPRESSION_NONE

#define COMPRESSION_NONE   1

◆ COMPRESSION_OJPEG

#define COMPRESSION_OJPEG   6

◆ COMPRESSION_PACKBITS

#define COMPRESSION_PACKBITS   32773

◆ COMPRESSION_THUNDERSCAN

#define COMPRESSION_THUNDERSCAN   32809

◆ dlldir

#define dlldir

◆ IoWriteNextSeqPicture

#define IoWriteNextSeqPicture ( SeqRef,
SeqIndex,
Buffer )   IoWriteSeqPicture(SeqRef, SeqIndex, Buffer)

Typedef Documentation

◆ LPCWSTR

typedef char* LPCWSTR

◆ SisoIoImageEngine

typedef void SisoIoImageEngine

Function Documentation

◆ DEPRECATED()

dlldir int DEPRECATED ( IoReadSeqPicture(void *SeqRef, int SeqIndex, void *buffer) )

◆ IoCalculateBufferSize()

dlldir size_t IoCalculateBufferSize ( int width,
int height,
int bits )

Calculate the buffer size according to the bit depth This function will return the buffer size for a given image format. For the packed formats (bit depth not a multiple of 8) the assumption is made that a line always starts on a byte boundary and that the last byte of the line will be padded with 0 as necessary. To calculate the buffer size fpr TIFF files, pass bitsPerSample*samplesPerPixel to bits.

Parameters
widthdimension of the image
heightdimension of the image
bitsbitwidth of a pixel
Returns
number of bytes used in buffer

◆ IoCloseAVI()

dlldir int IoCloseAVI ( void * AviRef)
Warning
this function only works on Windows

◆ IoCloseBmp()

dlldir int IoCloseBmp ( void * bmpHandle)
Warning
this function only works on Windows

◆ IoCloseSeq()

dlldir int IoCloseSeq ( void * SeqRef)

◆ IoConvert1BitTo8BitData()

dlldir int IoConvert1BitTo8BitData ( SisoIoImageEngine * handle)

converts a bitmap in an 8 bit gray image. It normalizes the gray values.

Parameters
handlethe image handle as opened by IoImageOpen(), IoOpenImage(), or IoOpenImageExt().
Returns
0 on success, negative values on error

◆ IoCreateAVIColor()

dlldir int IoCreateAVIColor ( void ** AviRef,
const char * filename,
int width,
int height,
double fps )
Warning
this function only works on Windows

◆ IoCreateAVIColorW()

dlldir int IoCreateAVIColorW ( void ** AviRef,
const LPCWSTR filename,
int width,
int height,
double fps )
Warning
this function only works on Windows

◆ IoCreateAVIGray()

dlldir int IoCreateAVIGray ( void ** AviRef,
const char * filename,
int width,
int height,
double fps )
Warning
this function only works on Windows

◆ IoCreateAVIGrayW()

dlldir int IoCreateAVIGrayW ( void ** AviRef,
const LPCWSTR filename,
int width,
int height,
double fps )
Warning
this function only works on Windows

◆ IoCreateSeq()

dlldir int IoCreateSeq ( void ** SeqRef,
const char * pFilename,
int width,
int height,
int bitdepth,
int flags )

◆ IoFreeImage()

dlldir int IoFreeImage ( SisoIoImageEngine * handle)

◆ IoFreeRaw()

dlldir int IoFreeRaw ( unsigned char * data)

◆ IoFreeTiff()

dlldir int IoFreeTiff ( unsigned char * data)

Release the memory resources of previously read image files.

Parameters
datapointer to the memory buffer retrieved by the functions IoReadTiff, IoReadTiffEx

◆ IoGetBitsPerComponent()

dlldir int IoGetBitsPerComponent ( const SisoIoImageEngine * handle)

◆ IoGetBitsPerPixel()

dlldir int IoGetBitsPerPixel ( const SisoIoImageEngine * handle)

◆ IoGetHeight()

dlldir int IoGetHeight ( const SisoIoImageEngine * handle)

◆ IoGetNrOfComponents()

dlldir int IoGetNrOfComponents ( const SisoIoImageEngine * handle)

◆ IoGetSeqInfo()

dlldir int IoGetSeqInfo ( void * SeqRef,
int * nrOfImages,
int * nrOfLostImages )

◆ IoGetWidth()

dlldir int IoGetWidth ( const SisoIoImageEngine * handle)

◆ IoImageGetData()

dlldir const void * IoImageGetData ( const SisoIoImageEngine * handle)

query the pixel data from an image. The channel order for color images is BLUE GREEN RED.

Parameters
handlethe image handle as opened by IoImageOpen(), IoOpenImage(), or IoOpenImageExt().
Returns
the pixel data of the image
Return values
NULLthe handle is invalid or no image data was loaded

◆ IoImageOpen()

dlldir int IoImageOpen ( const char * filename,
SisoIoImageEngine ** handle )

open an existing image file. The channel order for color images is BLUE GREEN RED. Supported file formats:

  • TIFF uncompressed, LZW, PackBits
    1. 1 Bit ( line width must be byte aligned )
      1. 8 Bit gray
      2. 16 Bit gray
      3. 24 Bit color
      4. 48 Bit color -BMP uncompressed
    2. 1 Bit ( line width must be byte aligned )
    3. 8 Bit gray
    4. 24 Bit color
Parameters
filenamename of the file that should be loaded
handlethe opened handle will be stored here
Returns
0 on success, negative values on error

This function is superior to IoOpenImage() as you will get an error code if what went wrong.

◆ IoImageOpenEx()

dlldir int IoImageOpenEx ( const char * filename,
SisoIoImageEngine ** handle,
int RGBSequence )

open an existing image file

Parameters
filenamename of the file that should be loaded
handlereturn value for access to worker functions
RGBSequence0 -> Buffer sequence always BGR, 1 -> always RGB

◆ IoOpenAVI()

dlldir int IoOpenAVI ( void ** AviRef,
const char * fileName,
int * width,
int * height,
int * bitDepth )
Warning
this function only works on Windows

◆ IoOpenImage()

dlldir SisoIoImageEngine * IoOpenImage ( const char * filename)

open an existing image file

Parameters
filenamename of the file that should be loaded
Returns
image handle on success, NULL otherwise
Deprecated
In new code you should use IoImageOpen() as this does the same operation but returns an error code if what went wrong.

Old code:

SisoIoImageEngine *handle = IoOpenImageExt("example.tif");
if (handle == NULL) {
// error handling
}
dlldir SisoIoImageEngine * IoOpenImageExt(const char *filename, unsigned char **data, int *width, int *height, int *bits)
open an existing image file
void SisoIoImageEngine
Definition sisoIo.h:321

New code:

int err = IoImageOpen("example.tif", &handle);
if (err != 0) {
// error handling
}
dlldir int IoImageOpen(const char *filename, SisoIoImageEngine **handle)
open an existing image file. The channel order for color images is BLUE GREEN RED....

◆ IoOpenImageExt()

dlldir SisoIoImageEngine * IoOpenImageExt ( const char * filename,
unsigned char ** data,
int * width,
int * height,
int * bits )

open an existing image file

Parameters
filenamename of the file that should be loaded
dataimage data will be referenced here
widthwidth of opened image
heightheight of opened image
bitsbit per pixel setting of opened image
Returns
image handle on success, NULL otherwise
Deprecated
In new code you should use IoImageOpen() and query the image settings by the appropiate functions.

Old code:

unsigned char *data;
int width, height, bits;
SisoIoImageEngine *handle = IoOpenImageExt("example.tif", &data, &width, &height, &bits);
if (handle == NULL) {
// error handling
}

New code:

const unsigned char *data;
int width, height, bits;
int err = IoImageOpen("example.tif", &handle);
if (err != 0) {
// error handling
}
data = (const unsigned char *)IoImageGetData(handle);
width = IoGetWidth(handle);
height = IoGetHeight(handle);
bits = IoGetBitsPerPixel(handle);
dlldir int IoGetHeight(const SisoIoImageEngine *handle)
dlldir const void * IoImageGetData(const SisoIoImageEngine *handle)
query the pixel data from an image. The channel order for color images is BLUE GREEN RED.
dlldir int IoGetWidth(const SisoIoImageEngine *handle)
dlldir int IoGetBitsPerPixel(const SisoIoImageEngine *handle)

◆ IoOpenSeq()

dlldir int IoOpenSeq ( void ** SeqRef,
const char * pFilename,
int * width,
int * height,
int * bitdepth,
int flags )

◆ IoReadAVIPicture()

dlldir int IoReadAVIPicture ( void * AviRef,
int PicNr,
void * buffer )
Warning
this function only works on Windows

◆ IoReadBmp()

dlldir void * IoReadBmp ( const char * filename,
unsigned char ** data,
int * width,
int * height,
int * bits )

Load data from a bitmap file to a memory buffer This functions loads the image data of a bitmap file to a memory buffer. The function allocates the memory buffer according to the detected image information inside the bitmap file and returns the pointer to the memory. In case of colored images, the ordering sequence of the color channels is BGR. Please note, that the image information inside the buffer is starting at the point ( X = 0, Y = 0), which means, that the data of the bitmap file is mirrored along a diagonal line compared to the bitmap format.

Parameters
filenamefilename including file extension
dataresulting memory buffer.
widthdimension of the image
heightdimension of the image
bitsbitwidth of a pixel
Warning
this function only works on Windows

◆ IoReadNextSeqPicture()

dlldir int IoReadNextSeqPicture ( void * SeqRef,
int * PicNr,
void * buffer )

◆ IoReadRaw()

dlldir int IoReadRaw ( const char * filename,
unsigned char ** data,
int * width,
int * height,
int * bits )

◆ IoReadTiff()

dlldir void * IoReadTiff ( const char * filename,
unsigned char ** data,
int * width,
int * height,
int * bitPerSample,
int * samplePerPixel )

Load a TIF file into a memory buffer.

Parameters
filenamefilename including file extension
dataa pointer to the newly created memory containing the image data
widthimage dimension: width
heightimage dimension: height
bitPerSampleno. of bits per sample (bitwidth)
samplePerPixelno. of samples per pixel

This functions reads the image information and puts the images data to a memory buffer, that will be allocated by the IO-library. In case of color formats, the ordering sequence of the RGB channels will always be BGR

◆ IoReadTiffEx()

dlldir void * IoReadTiffEx ( const char * filename,
unsigned char ** data,
int * width,
int * height,
int * bitPerSample,
int * samplePerPixel,
int RGBSequence )

Load a TIF file into a memory buffer (enhanced version).

Parameters
filenamefilename including file extension
dataa pointer to the newly created memory containing the image data
widthimage dimension: width
heightimage dimension: height
bitPerSampleno. of bits per sample (bitwidth)
samplePerPixelno. of samples per pixel
RGBSequencedefines the sequence of RGB channels at the resulting buffer: 0 order will be RGB, 1 order will be BGR
Returns
0 in case of success, otherwise various error codes

This functions reads the image information and puts the images data to a memory buffer, that will be allocated by the IO-library. The functions returns a pointer to then buffer of the image data, the dimensions of the image and details about the image format as well. The buffer memory will be released by the IOFreTiff function. The buffer is organized as a array of char line by line.

◆ IoReadTiffExW()

dlldir void * IoReadTiffExW ( const LPCWSTR filename,
unsigned char ** data,
int * width,
int * height,
int * bitPerSample,
int * samplePerPixel,
int RGBSequence )

Load a TIF file into a memory buffer.

Wide string version of the IoReadTiffEx function

◆ IoReadTiffW()

dlldir void * IoReadTiffW ( const LPCWSTR filename,
unsigned char ** data,
int * width,
int * height,
int * bitPerSample,
int * samplePerPixel )

Load a TIF file into a buffer,.

Widestring version of IoWriteTiff

Parameters
filenamefilename including file extension
dataa pointer to the newly created memory containing the image data
widthimage dimension: width
heightimage dimension: height
bitPerSampleno. of bits per sample (bitwidth)
samplePerPixelno. of samples per pixel

◆ IoSaveImageExt()

dlldir int IoSaveImageExt ( const char * filename,
void * data,
int width,
int height,
int bits )

save image to File. The channel order for color images is RED GREEN BLUE. Supported file formats:

  • TIFF uncompressed, LZW, PackBits
    1. 1 Bit ( line width must be byte aligned )
      1. 8 Bit gray
      2. 16 Bit gray
      3. 24 Bit color
      4. 48 Bit color -BMP uncompressed
    2. 1 Bit ( line width must be byte aligned )
    3. 8 Bit gray
    4. 24 Bit color
Parameters
filenamefilename of the destination image
dataimage data array
widthimage width
heightimage height
bitsbits per pixel
Returns
0 on success, negative values on error

◆ IoSeqCreateAvi()

dlldir int IoSeqCreateAvi ( void * SeqRef,
const char * aviFilename,
int StartSeqIndex,
int StopSeqIndex )

◆ IoWriteAVIPicture()

dlldir int IoWriteAVIPicture ( void * AviRef,
int PicNr,
const void * buffer )
Warning
this function only works on Windows

◆ IoWriteBmp()

dlldir int IoWriteBmp ( const char * filename,
unsigned char * data,
int width,
int height,
int bits )
Warning
this function only works on Windows

◆ IoWriteBmpW()

dlldir int IoWriteBmpW ( const LPCWSTR filename,
unsigned char * data,
int width,
int height,
int bits )
Warning
this function only works on Windows

◆ IoWriteRaw()

dlldir int IoWriteRaw ( const char * filename,
unsigned char * data,
int width,
int height,
int bits )

◆ IoWriteRawW()

dlldir int IoWriteRawW ( const LPCWSTR filename,
unsigned char * data,
int width,
int height,
int bits )

◆ IoWriteSeqPicture()

dlldir int IoWriteSeqPicture ( void * SeqRef,
int PicNr,
const void * buffer )

◆ IoWriteTiff()

dlldir int IoWriteTiff ( const char * filename,
unsigned char * data,
int width,
int height,
int bitPerSample,
int samplePerPixel )

Save Image data to to a file in TIF format.

See also
IOWriteTiffEx
Parameters
filename
data
width
height
bitPerSample
samplePerPixel

◆ IoWriteTiffCompression()

dlldir int IoWriteTiffCompression ( const char * filename,
unsigned char * data,
int width,
int height,
int bitPerSample,
int samplePerPixel,
int compressionFlag )

◆ IoWriteTiffEx()

dlldir int IoWriteTiffEx ( const char * filename,
unsigned char * data,
int width,
int height,
int bitPerSample,
int samplePerPixel,
int RGBSequence )

Save Image data to to a file in TIF format.

Parameters
filenamename of the target file to store the data
datapointer to a memory buffer e.g. retrieved by a call to IOReadTif
widthimage dimension at the memory buffer, in this case the width in pixel
heightimage dimension at the memory buffer, in this case the height in pixel
bitPerSampleno. of bits for a sample
samplePerPixelno. of samples per pixel
RGBSequenceallows to swap the RGB data a the image data (in case of color formats). Note that the buffer data will be modified in this case
Returns
0 in case of success, otherwise various error codes

This functions writes image form a memory buffer to the according file. The image data is located at the given buffer (data), which is filled according to the IOReadTiff functions. When using color formats, the sequence of RGB at the file can be swapped in order to allow conversions from different image formats (e.g. BMP-> TIFF). The buffer itself doesn't get modified in this case.

◆ IoWriteTiffExW()

dlldir int IoWriteTiffExW ( const LPCWSTR filename,
unsigned char * data,
int width,
int height,
int bitPerSample,
int samplePerPixel,
int RGBSequence )

Save Image data to to a file in TIF format.

Widestring version of IoWriteTiffEx

See also
IoWriteTiffEx
Parameters
filenamename of the target file to store the data
datapointer to a memory buffer e.g. retrieved by a call to IOReadTif
widthimage dimension at the memory buffer, in this case the width in pixel
heightimage dimension at the memory buffer, in this case the height in pixel
bitPerSampleno. of bits for a sample
samplePerPixelno. of samples per pixel
RGBSequenceallows to swap the RGB data a the image data (in case of color formats). Note that the buffer data will be modified in this case
Returns
0 in case of success, otherwise various error codes

◆ IoWriteTiffW()

dlldir int IoWriteTiffW ( const LPCWSTR filename,
unsigned char * data,
int width,
int height,
int bitPerSample,
int samplePerPixel )

Save Image data to to a file in TIF format.

Widestring version of IoWriteTiff

See also
IoWriteTiff
Parameters
filenamename of the target file to store the data
datapointer to a memory buffer e.g. retrieved by a call to IOReadTif
widthimage dimension at the memory buffer, in this case the width in pixel
heightimage dimension at the memory buffer, in this case the height in pixel
bitPerSampleno. of bits for a sample
samplePerPixelno. of samples per pixel
Returns
0 in case of success, otherwise various error codes