TGAWriteImage

Name

TGAWriteImage -- write image

Synopsis

int TGAWriteImage(TGA* tga, TGAData* data);

Arguments

tga

pointer to valid TGA structure

data

pointer to valid TGAData structure

Description

This function does all the work of writing a TGA image. It calles the TGAWriteHeader, TGAWriteImageId, TGAWriteColorMap and TGAWriteScanlines with the appropriate arguments to perform its task. So in most cases this is the only library function that needs to be called by the user to write out an TGA image (besides TGAOpen and TGAClose functions of course). The color map data is read automatically is existing. I suggest using this function instead of the other TGAWrite* functions.

It returns TGA_OK on success.