GrafX2 2.9.3227
The ultimate 256-color painting program
|
Tagged Image File Format. More...
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... | |
Tagged Image File Format.
Uses libtiff http://www.simplesystems.org/libtiff/
#define TIFFTAG_GRAFX2 65500 |
GrafX2 private TIFF tag : 4 bytes.
This TAG is read only if the Software tag begins with "GrafX2"
|
static |
References format, GFX2_ERROR, and GFX2_LogV().
Referenced by TIFF_Init().
|
static |
References format, GFX2_LogV(), and GFX2_WARNING.
Referenced by TIFF_Init().
|
static |
Our TIFF Tag Extender procedure.
Used to add TIFFTAG_GRAFX2 handling
References NULL, TIFFParentExtender, and TIFFTAG_GRAFX2.
Referenced by TIFF_Init().
|
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().
void Test_TIFF | ( | T_IO_Context * | context, |
FILE * | file | ||
) |
test for a valid TIFF
References File_error, and Read_bytes().
|
static |
Load current image in TIFF.
References File_error, GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), T_IO_Context::Height, NULL, Set_pixel(), Set_pixel_24b(), and T_IO_Context::Width.
Referenced by Load_TIFF_Sub().
void Load_TIFF_Sub | ( | T_IO_Context * | context, |
TIFF * | tif, | ||
unsigned long | file_size | ||
) |
Load TIFF.
References T_IO_Context::Background_transparent, T_IO_Context::bpp, T_IO_Context::Comment, COMMENT_SIZE, CONTEXT_MAIN_IMAGE, File_error, FORMAT_TIFF, GFX2_DEBUG, GFX2_Log(), T_IO_Context::Height, IMAGE_MODE_ANIMATION, IMAGE_MODE_LAYERED, Load_TIFF_image(), mode, NULL, T_IO_Context::Palette, PIXEL_SIMPLE, PIXEL_TALL, PIXEL_TALL3, PIXEL_WIDE, Pre_load(), Set_image_mode(), Set_loading_layer(), TIFFTAG_GRAFX2, T_IO_Context::Transparent_color, T_IO_Context::Type, and T_IO_Context::Width.
Referenced by Load_TIFF(), and Load_TIFF_from_memory().
tsize_t lTIFF_read | ( | thandle_t | p, |
void * | data, | ||
tsize_t | size | ||
) |
References memory_buffer::buffer, GFX2_DEBUG, GFX2_Log(), memory_buffer::offset, and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
tsize_t lTIFF_write | ( | thandle_t | p, |
void * | data, | ||
tsize_t | size | ||
) |
References memory_buffer::alloc_size, memory_buffer::buffer, GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), NULL, memory_buffer::offset, and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
toff_t lTIFF_seek | ( | thandle_t | p, |
toff_t | offset, | ||
int | whence | ||
) |
References memory_buffer::alloc_size, memory_buffer::buffer, GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), NULL, memory_buffer::offset, and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
toff_t lTIFF_size | ( | thandle_t | p | ) |
References GFX2_DEBUG, GFX2_Log(), and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
int lTIFF_close | ( | thandle_t | p | ) |
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
int lTIFF_map | ( | thandle_t | p, |
void ** | base, | ||
toff_t * | size | ||
) |
References memory_buffer::buffer, GFX2_DEBUG, GFX2_Log(), and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
void lTIFF_unmap | ( | thandle_t | p, |
void * | base, | ||
toff_t | size | ||
) |
References GFX2_DEBUG, GFX2_Log(), and memory_buffer::size.
Referenced by Load_TIFF_from_memory(), and Save_TIFF_to_memory().
void Load_TIFF_from_memory | ( | T_IO_Context * | context, |
const void * | buffer, | ||
unsigned long | size | ||
) |
Load TIFF from memory.
References memory_buffer::alloc_size, memory_buffer::buffer, Load_TIFF_Sub(), lTIFF_close(), lTIFF_map(), lTIFF_read(), lTIFF_seek(), lTIFF_size(), lTIFF_unmap(), lTIFF_write(), NULL, memory_buffer::offset, memory_buffer::size, and TIFF_Init().
Referenced by Load_ClipBoard_Image().
void Load_TIFF | ( | T_IO_Context * | context | ) |
Load TIFF from file.
References T_IO_Context::File_directory, File_error, File_length(), File_length_file(), T_IO_Context::File_name, Filepath_append_to_dir(), Load_TIFF_Sub(), NULL, Open_file_read(), and TIFF_Init().
void Save_TIFF_Sub | ( | T_IO_Context * | context, |
TIFF * | tif | ||
) |
Save (already open) TIFF.
References T_IO_Context::Background_transparent, T_Document::backups, T_IO_Context::Comment, CONTEXT_MAIN_IMAGE, File_error, GFX2_DEBUG, GFX2_Log(), T_IO_Context::Height, T_Page::Image_mode, Main, T_IO_Context::Nb_layers, T_List_of_pages::Pages, T_IO_Context::Palette, T_IO_Context::Pitch, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_WIDE, PIXEL_WIDE2, Program_version, T_IO_Context::Ratio, Set_saving_layer(), SVN_revision, T_IO_Context::Target_address, TIFFTAG_GRAFX2, T_IO_Context::Transparent_color, T_IO_Context::Type, and T_IO_Context::Width.
Referenced by Save_TIFF(), and Save_TIFF_to_memory().
void Save_TIFF_to_memory | ( | T_IO_Context * | context, |
void ** | buffer, | ||
unsigned long * | size | ||
) |
Save TIFF to memory.
References memory_buffer::alloc_size, memory_buffer::buffer, lTIFF_close(), lTIFF_map(), lTIFF_read(), lTIFF_seek(), lTIFF_size(), lTIFF_unmap(), lTIFF_write(), NULL, memory_buffer::offset, Save_TIFF_Sub(), memory_buffer::size, and TIFF_Init().
Referenced by Save_ClipBoard_Image().
void Save_TIFF | ( | T_IO_Context * | context | ) |
Save TIFF.
References T_IO_Context::File_directory, File_error, T_IO_Context::File_name, T_IO_Context::File_name_unicode, Filepath_append_to_dir(), NULL, Save_TIFF_Sub(), and TIFF_Init().
|
extern |
Referenced by Save_TIFF_Sub().
|
extern |
Referenced by Save_TIFF_Sub().
|
static |
old TIFF extender procedure to be recursively called
Referenced by GFX2_TIFFTagExtender(), and TIFF_Init().