GrafX2 2.9.3227
The ultimate 256-color painting program

Tagged Image File Format. More...

+ Collaboration diagram for TIFF:

Data Structures

struct  memory_buffer
 

Macros

#define TIFFTAG_GRAFX2   65500
 GrafX2 private TIFF tag : 4 bytes. More...
 

Functions

static void TIFF_LogError (const char *module, const char *fmt, va_list ap)
 
static void TIFF_LogWarning (const char *module, const char *fmt, va_list ap)
 
static void GFX2_TIFFTagExtender (TIFF *tif)
 Our TIFF Tag Extender procedure. More...
 
static void TIFF_Init (void)
 Initialisation for using the TIFF library. More...
 
void Test_TIFF (T_IO_Context *context, FILE *file)
 test for a valid TIFF More...
 
static void Load_TIFF_image (T_IO_Context *context, TIFF *tif, word spp, word bps)
 Load current image in TIFF. More...
 
void Load_TIFF_Sub (T_IO_Context *context, TIFF *tif, unsigned long file_size)
 Load TIFF. More...
 
tsize_t lTIFF_read (thandle_t p, void *data, tsize_t size)
 
tsize_t lTIFF_write (thandle_t p, void *data, tsize_t size)
 
toff_t lTIFF_seek (thandle_t p, toff_t offset, int whence)
 
toff_t lTIFF_size (thandle_t p)
 
int lTIFF_close (thandle_t p)
 
int lTIFF_map (thandle_t p, void **base, toff_t *size)
 
void lTIFF_unmap (thandle_t p, void *base, toff_t size)
 
void Load_TIFF_from_memory (T_IO_Context *context, const void *buffer, unsigned long size)
 Load TIFF from memory. More...
 
void Load_TIFF (T_IO_Context *context)
 Load TIFF from file. More...
 
void Save_TIFF_Sub (T_IO_Context *context, TIFF *tif)
 Save (already open) TIFF. More...
 
void Save_TIFF_to_memory (T_IO_Context *context, void **buffer, unsigned long *size)
 Save TIFF to memory. More...
 
void Save_TIFF (T_IO_Context *context)
 Save TIFF. More...
 

Variables

char Program_version []
 
const char SVN_revision []
 
static TIFFExtendProc TIFFParentExtender = NULL
 old TIFF extender procedure to be recursively called More...
 

Detailed Description

Tagged Image File Format.

Uses libtiff http://www.simplesystems.org/libtiff/

Macro Definition Documentation

◆ TIFFTAG_GRAFX2

#define TIFFTAG_GRAFX2   65500

GrafX2 private TIFF tag : 4 bytes.

  • bkg/transp color
  • background transparent
  • image mode
  • reserved (0)

This TAG is read only if the Software tag begins with "GrafX2"

Function Documentation

◆ TIFF_LogError()

static void TIFF_LogError ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

References format, GFX2_ERROR, and GFX2_LogV().

Referenced by TIFF_Init().

◆ TIFF_LogWarning()

static void TIFF_LogWarning ( const char *  module,
const char *  fmt,
va_list  ap 
)
static

References format, GFX2_LogV(), and GFX2_WARNING.

Referenced by TIFF_Init().

◆ GFX2_TIFFTagExtender()

static void GFX2_TIFFTagExtender ( TIFF *  tif)
static

Our TIFF Tag Extender procedure.

Used to add TIFFTAG_GRAFX2 handling

References NULL, TIFFParentExtender, and TIFFTAG_GRAFX2.

Referenced by TIFF_Init().

◆ TIFF_Init()

static void TIFF_Init ( void  )
static

Initialisation for using the TIFF library.

use TIFFSetErrorHandler() and TIFFSetWarningHandler() to redirect warning/error output to our own functions

References GFX2_DEBUG, GFX2_Log(), GFX2_TIFFTagExtender(), TIFF_LogError(), TIFF_LogWarning(), and TIFFParentExtender.

Referenced by Load_TIFF(), Load_TIFF_from_memory(), Save_TIFF(), and Save_TIFF_to_memory().

◆ Test_TIFF()

void Test_TIFF ( T_IO_Context context,
FILE *  file 
)

test for a valid TIFF

References File_error, and Read_bytes().

◆ Load_TIFF_image()

static void Load_TIFF_image ( T_IO_Context context,
TIFF *  tif,
word  spp,
word  bps 
)
static

◆ Load_TIFF_Sub()

◆ lTIFF_read()

tsize_t lTIFF_read ( thandle_t  p,
void *  data,
tsize_t  size 
)

◆ lTIFF_write()

tsize_t lTIFF_write ( thandle_t  p,
void *  data,
tsize_t  size 
)

◆ lTIFF_seek()

toff_t lTIFF_seek ( thandle_t  p,
toff_t  offset,
int  whence 
)

◆ lTIFF_size()

toff_t lTIFF_size ( thandle_t  p)

◆ lTIFF_close()

int lTIFF_close ( thandle_t  p)

◆ lTIFF_map()

int lTIFF_map ( thandle_t  p,
void **  base,
toff_t *  size 
)

◆ lTIFF_unmap()

void lTIFF_unmap ( thandle_t  p,
void *  base,
toff_t  size 
)

◆ Load_TIFF_from_memory()

void Load_TIFF_from_memory ( T_IO_Context context,
const void *  buffer,
unsigned long  size 
)

◆ Load_TIFF()

◆ Save_TIFF_Sub()

◆ Save_TIFF_to_memory()

void Save_TIFF_to_memory ( T_IO_Context context,
void **  buffer,
unsigned long *  size 
)

◆ Save_TIFF()

Variable Documentation

◆ Program_version

char Program_version[]
extern

Referenced by Save_TIFF_Sub().

◆ SVN_revision

const char SVN_revision[]
extern

Referenced by Save_TIFF_Sub().

◆ TIFFParentExtender

TIFFExtendProc TIFFParentExtender = NULL
static

old TIFF extender procedure to be recursively called

Referenced by GFX2_TIFFTagExtender(), and TIFF_Init().