Implement in-memory source/destination managers even when not emulating the libjpeg v8 API/ABI
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@913 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
14
jdatadst.c
14
jdatadst.c
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user