diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2013-01-18 23:42:31 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2013-01-18 23:42:31 +0000 |
commit | bebb38d3efdeba0f1893c0c3bf74212873b977d8 (patch) | |
tree | cbb9c0fceb3e39c397f5509b7d842f9962c6c07b /jdatadst.c | |
parent | 8525b369cb6144802921c25bcc36a5431a29fab2 (diff) |
Implement in-memory source/destination managers even when not emulating the libjpeg v8 API/ABI
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@913 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jdatadst.c')
-rw-r--r-- | jdatadst.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,9 +1,11 @@ /* * jdatadst.c * + * This file was part of the Independent JPEG Group's software: * Copyright (C) 1994-1996, Thomas G. Lane. * Modified 2009-2012 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. + * Modifications: + * Copyright (C) 2013, D. R. Commander. * For conditions of distribution and use, see the accompanying README file. * * This file contains compression data destination routines for the case of @@ -40,7 +42,7 @@ typedef my_destination_mgr * my_dest_ptr; #define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ -#if JPEG_LIB_VERSION >= 80 +#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) /* Expanded data destination object for memory output */ typedef struct { @@ -76,7 +78,7 @@ init_destination (j_compress_ptr cinfo) dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; } -#if JPEG_LIB_VERSION >= 80 +#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) METHODDEF(void) init_mem_destination (j_compress_ptr cinfo) { @@ -123,7 +125,7 @@ empty_output_buffer (j_compress_ptr cinfo) return TRUE; } -#if JPEG_LIB_VERSION >= 80 +#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) METHODDEF(boolean) empty_mem_output_buffer (j_compress_ptr cinfo) { @@ -182,7 +184,7 @@ term_destination (j_compress_ptr cinfo) ERREXIT(cinfo, JERR_FILE_WRITE); } -#if JPEG_LIB_VERSION >= 80 +#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) METHODDEF(void) term_mem_destination (j_compress_ptr cinfo) { @@ -225,7 +227,7 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) } -#if JPEG_LIB_VERSION >= 80 +#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) /* * Prepare for output to a memory buffer. * The caller may supply an own initial buffer with appropriate size. |