Alien-FreeImage

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

src/Source/LibPNG/LibPNG.2008.vcproj
src/Source/LibPNG/LibPNG.2013.vcxproj
src/Source/LibPNG/LibPNG.2013.vcxproj.filters
src/Source/LibPNG/libpng.3
src/Source/LibPNG/libpngpf.3
src/Source/LibPNG/LICENSE
src/Source/LibPNG/png.5
src/Source/LibPNG/png.c
src/Source/LibPNG/png.h
src/Source/LibPNG/pngconf.h
src/Source/LibPNG/pngdebug.h
src/Source/LibPNG/pngerror.c
src/Source/LibPNG/pngget.c
src/Source/LibPNG/pnginfo.h
src/Source/LibPNG/pnglibconf.h
src/Source/LibPNG/pngmem.c
src/Source/LibPNG/pngpread.c
src/Source/LibPNG/pngpriv.h
src/Source/LibPNG/pngread.c
src/Source/LibPNG/pngrio.c
src/Source/LibPNG/pngrtran.c

src/Makefile.srcs  view on Meta::CPAN

VER_MAJOR = 3
VER_MINOR = 17.0
SRCS = ./Source/FreeImage/BitmapAccess.cpp ./Source/FreeImage/ColorLookup.cpp ./Source/FreeImage/FreeImage.cpp ./Source/FreeImage/FreeImageC.c ./Source/FreeImage/FreeImageIO.cpp ./Source/FreeImage/GetType.cpp ./Source/FreeImage/MemoryIO.cpp ./Source/...
INCLS = ./Examples/OpenGL/TextureManager/TextureManager.h ./Examples/Plugin/PluginCradle.h ./Examples/Generic/FIIO_Mem.h ./Source/MapIntrospector.h ./Source/FreeImage - Copie.h ./Source/CacheFile.h ./Source/LibTIFF/tiffconf.vc.h ./Source/LibTIFF/tif_...

INCLUDE = -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/Open...

src/Source/FreeImage/BitmapAccess.cpp  view on Meta::CPAN

		{
			const double dPitch = floor( ((double)bpp * width + 31.0) / 32.0 ) * 4.0;
			const double dImageSize = (double)header_size + dPitch * height;
			if(dImageSize != (double)dib_size) {
				// here, we are sure to encounter a malloc overflow: try to avoid it ...
				return 0;
			}

			/*
			The following constant take into account the additionnal memory used by 
			aligned malloc functions as well as debug malloc functions. 
			It is supposed here that using a (8 * FIBITMAP_ALIGNMENT) risk margin will be enough
			for the target compiler. 
			*/
			const double FIBITMAP_MAX_MEMORY = (double)((size_t)-1) - 8 * FIBITMAP_ALIGNMENT;

			if(dImageSize > FIBITMAP_MAX_MEMORY) {
				// avoid possible overflow inside C allocation functions
				return 0;
			}
		}

src/Source/FreeImage/MNGHelper.cpp  view on Meta::CPAN

				case JHDR:
					if(mLength == 16) {
						memcpy(&jng_width, &mChunk[0], 4);
						memcpy(&jng_height, &mChunk[4], 4);
						mng_SwapLong(&jng_width);
						mng_SwapLong(&jng_height);

						jng_color_type = mChunk[8];
						jng_image_sample_depth = mChunk[9];
						jng_image_compression_method = mChunk[10];
						//BYTE jng_image_interlace_method = mChunk[11];	// for debug only

						jng_alpha_sample_depth = mChunk[12];
						jng_alpha_compression_method = mChunk[13];
						jng_alpha_filter_method = mChunk[14];
						jng_alpha_interlace_method = mChunk[15];
					} else {
						FreeImage_OutputMessageProc(format_id, "Error while parsing %s chunk: invalid chunk length", mChunkName);
						throw (const char*)NULL;
					}
					break;

src/Source/LibJPEG/cjpeg.c  view on Meta::CPAN

  fprintf(stderr, "  -dct float     Use floating-point DCT method%s\n",
	  (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
#endif
  fprintf(stderr, "  -nosmooth      Don't use high-quality downsampling\n");
  fprintf(stderr, "  -restart N     Set restart interval in rows, or in blocks with B\n");
#ifdef INPUT_SMOOTHING_SUPPORTED
  fprintf(stderr, "  -smooth N      Smooth dithered input (N=1..100 is strength)\n");
#endif
  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
  fprintf(stderr, "  -outfile name  Specify name for output file\n");
  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
  fprintf(stderr, "Switches for wizards:\n");
  fprintf(stderr, "  -baseline      Force baseline quantization tables\n");
  fprintf(stderr, "  -qtables file  Use quantization tables given in file\n");
  fprintf(stderr, "  -qslots N[,...]    Set component quantization tables\n");
  fprintf(stderr, "  -sample HxV[,...]  Set component sampling factors\n");
#ifdef C_MULTISCAN_FILES_SUPPORTED
  fprintf(stderr, "  -scans file    Create multi-scan JPEG per script file\n");
#endif
  exit(EXIT_FAILURE);
}

src/Source/LibJPEG/cjpeg.c  view on Meta::CPAN

	usage();
      if (keymatch(argv[argn], "int", 1)) {
	cinfo->dct_method = JDCT_ISLOW;
      } else if (keymatch(argv[argn], "fast", 2)) {
	cinfo->dct_method = JDCT_IFAST;
      } else if (keymatch(argv[argn], "float", 2)) {
	cinfo->dct_method = JDCT_FLOAT;
      } else
	usage();

    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
      /* Enable debug printouts. */
      /* On first -d, print version identification */
      static boolean printed_version = FALSE;

      if (! printed_version) {
	fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
		JVERSION, JCOPYRIGHT);
	printed_version = TRUE;
      }
      cinfo->err->trace_level++;

src/Source/LibJPEG/djpeg.c  view on Meta::CPAN

  fprintf(stderr, "  -dither ordered  Use ordered dither (medium speed, quality)\n");
#ifdef QUANT_2PASS_SUPPORTED
  fprintf(stderr, "  -map FILE      Map to colors used in named image file\n");
#endif
  fprintf(stderr, "  -nosmooth      Don't use high-quality upsampling\n");
#ifdef QUANT_1PASS_SUPPORTED
  fprintf(stderr, "  -onepass       Use 1-pass quantization (fast, low quality)\n");
#endif
  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
  fprintf(stderr, "  -outfile name  Specify name for output file\n");
  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
  exit(EXIT_FAILURE);
}


LOCAL(int)
parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
		int last_file_arg_seen, boolean for_real)
/* Parse optional switches.
 * Returns argv[] index of first file-name argument (== argc if none).
 * Any file names with indexes <= last_file_arg_seen are ignored;

src/Source/LibJPEG/djpeg.c  view on Meta::CPAN

	usage();
      if (keymatch(argv[argn], "fs", 2)) {
	cinfo->dither_mode = JDITHER_FS;
      } else if (keymatch(argv[argn], "none", 2)) {
	cinfo->dither_mode = JDITHER_NONE;
      } else if (keymatch(argv[argn], "ordered", 2)) {
	cinfo->dither_mode = JDITHER_ORDERED;
      } else
	usage();

    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
      /* Enable debug printouts. */
      /* On first -d, print version identification */
      static boolean printed_version = FALSE;

      if (! printed_version) {
	fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
		JVERSION, JCOPYRIGHT);
	printed_version = TRUE;
      }
      cinfo->err->trace_level++;

src/Source/LibJPEG/install.txt  view on Meta::CPAN

To force a particular compiler to be selected, use the CC option, for example
	./configure CC='cc'
The same method can be used to include any unusual compiler switches.
For example, on HP-UX you probably want to say
	./configure CC='cc -Aa'
to get HP's compiler to run in ANSI mode.

* The default CFLAGS setting is "-g" for non-gcc compilers, "-g -O2" for gcc.
You can override this by saying, for example,
	./configure CFLAGS='-O2'
if you want to compile without debugging support.

* Configure will set up the makefile so that "make install" will install files
into /usr/local/bin, /usr/local/man, etc.  You can specify an installation
prefix other than "/usr/local" by giving configure the option "--prefix=PATH".

* If you don't have a lot of swap space, you may need to enable the IJG
software's internal virtual memory mechanism.  To do this, give the option
"--enable-maxmem=N" where N is the default maxmemory limit in megabytes.
This is discussed in more detail under "Selecting a memory manager", below.
You probably don't need to worry about this on reasonably-sized Unix machines,

src/Source/LibJPEG/install.txt  view on Meta::CPAN

"makefile".  If you want to call it something else, say "makefile.mak",
be sure to adjust the dependency line that reads "$(RFILE) : makefile".
Otherwise the make will fail because it doesn't know how to create "makefile".
Worse, some releases of Microsoft's make utilities give an incorrect error
message in this situation.

Old versions of MS C fail with an "out of macro expansion space" error
because they can't cope with the macro TRACEMS8 (defined in jerror.h).
If this happens to you, the easiest solution is to change TRACEMS8 to
expand to nothing.  You'll lose the ability to dump out JPEG coefficient
tables with djpeg -debug -debug, but at least you can compile.

Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn
off optimization entirely (remove -O from CFLAGS).  6.00A is better, but it
still generates bad code if you enable loop optimizations (-Ol or -Ox).

MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ...
which is on by default.  To work around this bug, compile that one file
with /Oo-.


src/Source/LibJPEG/jcapimin.c  view on Meta::CPAN

  int i;

  /* Guard against version mismatches between library and caller. */
  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
  if (version != JPEG_LIB_VERSION)
    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
  if (structsize != SIZEOF(struct jpeg_compress_struct))
    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
	     (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);

  /* For debugging purposes, we zero the whole master structure.
   * But the application has already set the err pointer, and may have set
   * client_data, so we have to save and restore those fields.
   * Note: if application hasn't set client_data, tools like Purify may
   * complain here.
   */
  {
    struct jpeg_error_mgr * err = cinfo->err;
    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
    MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
    cinfo->err = err;

src/Source/LibJPEG/jdapimin.c  view on Meta::CPAN

  int i;

  /* Guard against version mismatches between library and caller. */
  cinfo->mem = NULL;		/* so jpeg_destroy knows mem mgr not called */
  if (version != JPEG_LIB_VERSION)
    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
  if (structsize != SIZEOF(struct jpeg_decompress_struct))
    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
	     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);

  /* For debugging purposes, we zero the whole master structure.
   * But the application has already set the err pointer, and may have set
   * client_data, so we have to save and restore those fields.
   * Note: if application hasn't set client_data, tools like Purify may
   * complain here.
   */
  {
    struct jpeg_error_mgr * err = cinfo->err;
    void * client_data = cinfo->client_data; /* ignore Purify complaint here */
    MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct));
    cinfo->err = err;

src/Source/LibJPEG/jerror.h  view on Meta::CPAN

#define WARNMS1(cinfo,code,p1)  \
  ((cinfo)->err->msg_code = (code), \
   (cinfo)->err->msg_parm.i[0] = (p1), \
   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
#define WARNMS2(cinfo,code,p1,p2)  \
  ((cinfo)->err->msg_code = (code), \
   (cinfo)->err->msg_parm.i[0] = (p1), \
   (cinfo)->err->msg_parm.i[1] = (p2), \
   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))

/* Informational/debugging messages */
#define TRACEMS(cinfo,lvl,code)  \
  ((cinfo)->err->msg_code = (code), \
   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#define TRACEMS1(cinfo,lvl,code,p1)  \
  ((cinfo)->err->msg_code = (code), \
   (cinfo)->err->msg_parm.i[0] = (p1), \
   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
#define TRACEMS2(cinfo,lvl,code,p1,p2)  \
  ((cinfo)->err->msg_code = (code), \
   (cinfo)->err->msg_parm.i[0] = (p1), \

src/Source/LibJPEG/jmemmgr.c  view on Meta::CPAN


#ifdef MEM_STATS		/* optional extra stuff for statistics */

LOCAL(void)
print_mem_stats (j_common_ptr cinfo, int pool_id)
{
  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
  small_pool_ptr shdr_ptr;
  large_pool_ptr lhdr_ptr;

  /* Since this is only a debugging stub, we can cheat a little by using
   * fprintf directly rather than going through the trace message code.
   * This is helpful because message parm array can't handle longs.
   */
  fprintf(stderr, "Freeing pool %d, total space = %ld\n",
	  pool_id, mem->total_space_allocated);

  for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
       lhdr_ptr = lhdr_ptr->hdr.next) {
    fprintf(stderr, "  Large chunk used %ld\n",
	    (long) lhdr_ptr->hdr.bytes_used);

src/Source/LibJPEG/jmemmgr.c  view on Meta::CPAN

access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
		    JDIMENSION start_row, JDIMENSION num_rows,
		    boolean writable)
/* Access the part of a virtual sample array starting at start_row */
/* and extending for num_rows rows.  writable is true if  */
/* caller intends to modify the accessed area. */
{
  JDIMENSION end_row = start_row + num_rows;
  JDIMENSION undef_row;

  /* debugging check */
  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
      ptr->mem_buffer == NULL)
    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);

  /* Make the desired part of the virtual array accessible */
  if (start_row < ptr->cur_start_row ||
      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
    if (! ptr->b_s_open)
      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
    /* Flush old buffer contents if necessary */

src/Source/LibJPEG/jmemmgr.c  view on Meta::CPAN

access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
		    JDIMENSION start_row, JDIMENSION num_rows,
		    boolean writable)
/* Access the part of a virtual block array starting at start_row */
/* and extending for num_rows rows.  writable is true if  */
/* caller intends to modify the accessed area. */
{
  JDIMENSION end_row = start_row + num_rows;
  JDIMENSION undef_row;

  /* debugging check */
  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||
      ptr->mem_buffer == NULL)
    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);

  /* Make the desired part of the virtual array accessible */
  if (start_row < ptr->cur_start_row ||
      end_row > ptr->cur_start_row+ptr->rows_in_mem) {
    if (! ptr->b_s_open)
      ERREXIT(cinfo, JERR_VIRTUAL_BUG);
    /* Flush old buffer contents if necessary */

src/Source/LibJPEG/jmorecfg.h  view on Meta::CPAN

 */

typedef unsigned int JDIMENSION;

#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */


/* These macros are used in all function definitions and extern declarations.
 * You could modify them if you need to change function linkage conventions;
 * in particular, you'll need to do that to make the library a Windows DLL.
 * Another application is to make all functions global for use with debuggers
 * or code profilers that require it.
 */

/* a function called through method pointers: */
#define METHODDEF(type)		static type
/* a function used only in its module: */
#define LOCAL(type)		static type
/* a function referenced thru EXTERNs: */
#define GLOBAL(type)		type
/* a reference to a GLOBAL function: */

src/Source/LibJPEG/jpegtran.c  view on Meta::CPAN

  fprintf(stderr, "  -trim          Drop non-transformable edge blocks\n");
  fprintf(stderr, "  -wipe WxH+X+Y  Wipe (gray out) a rectangular subarea\n");
#endif
  fprintf(stderr, "Switches for advanced users:\n");
#ifdef C_ARITH_CODING_SUPPORTED
  fprintf(stderr, "  -arithmetic    Use arithmetic coding\n");
#endif
  fprintf(stderr, "  -restart N     Set restart interval in rows, or in blocks with B\n");
  fprintf(stderr, "  -maxmemory N   Maximum memory to use (in kbytes)\n");
  fprintf(stderr, "  -outfile name  Specify name for output file\n");
  fprintf(stderr, "  -verbose  or  -debug   Emit debug output\n");
  fprintf(stderr, "Switches for wizards:\n");
#ifdef C_MULTISCAN_FILES_SUPPORTED
  fprintf(stderr, "  -scans file    Create multi-scan JPEG per script file\n");
#endif
  exit(EXIT_FAILURE);
}


LOCAL(void)
select_transform (JXFORM_CODE transform)

src/Source/LibJPEG/jpegtran.c  view on Meta::CPAN

      if (transformoption.crop /* reject multiple crop/wipe requests */ ||
	  ! jtransform_parse_crop_spec(&transformoption, argv[argn])) {
	fprintf(stderr, "%s: bogus -crop argument '%s'\n",
		progname, argv[argn]);
	exit(EXIT_FAILURE);
      }
#else
      select_transform(JXFORM_NONE);	/* force an error */
#endif

    } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
      /* Enable debug printouts. */
      /* On first -d, print version identification */
      static boolean printed_version = FALSE;

      if (! printed_version) {
	fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",
		JVERSION, JCOPYRIGHT);
	printed_version = TRUE;
      }
      cinfo->err->trace_level++;

src/Source/LibJPEG/libjpeg.txt  view on Meta::CPAN

the JPEG library must not invert the data itself, or else Ghostscript would
read these EPS files incorrectly.


Error handling
--------------

When the default error handler is used, any error detected inside the JPEG
routines will cause a message to be printed on stderr, followed by exit().
You can supply your own error handling routines to override this behavior
and to control the treatment of nonfatal warnings and trace/debug messages.
The file example.c illustrates the most common case, which is to have the
application regain control after an error rather than exiting.

The JPEG library never writes any message directly; it always goes through
the error handling routines.  Three classes of messages are recognized:
  * Fatal errors: the library cannot continue.
  * Warnings: the library can continue, but the data is corrupt, and a
    damaged output image is likely to result.
  * Trace/informational messages.  These come with a trace level indicating
    the importance of the message; you can control the verbosity of the

src/Source/LibJPEG/usage.txt  view on Meta::CPAN

	-smooth N	Smooth the input image to eliminate dithering noise.
			N, ranging from 1 to 100, indicates the strength of
			smoothing.  0 (the default) means no smoothing.

	-maxmemory N	Set limit for amount of memory to use in processing
			large images.  Value is in thousands of bytes, or
			millions of bytes if "M" is attached to the number.
			For example, -max 4m selects 4000000 bytes.  If more
			space is needed, temporary files will be used.

	-verbose	Enable debug printout.  More -v's give more printout.
	or  -debug	Also, version information is printed at startup.

The -restart option inserts extra markers that allow a JPEG decoder to
resynchronize after a transmission error.  Without restart markers, any damage
to a compressed file will usually ruin the image from the point of the error
to the end of the image; with restart markers, the damage is usually confined
to the portion of the image up to the next restart marker.  Of course, the
restart markers occupy extra space.  We recommend -restart 1 for images that
will be transmitted across unreliable networks such as Usenet.

The -smooth option filters the input to eliminate fine-scale noise.  This is

src/Source/LibJPEG/usage.txt  view on Meta::CPAN

			ignored unless you also say -colors N.  Also,
			the one-pass method is always used for gray-scale
			output (the two-pass method is no improvement then).

	-maxmemory N	Set limit for amount of memory to use in processing
			large images.  Value is in thousands of bytes, or
			millions of bytes if "M" is attached to the number.
			For example, -max 4m selects 4000000 bytes.  If more
			space is needed, temporary files will be used.

	-verbose	Enable debug printout.  More -v's give more printout.
	or  -debug	Also, version information is printed at startup.


HINTS FOR CJPEG

Color GIF files are not the ideal input for JPEG; JPEG is really intended for
compressing full-color (24-bit) images.  In particular, don't try to convert
cartoons, line drawings, and other images that have only a few distinct
colors.  GIF works great on these, JPEG does not.  If you want to convert a
GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options
to get a satisfactory conversion.  -smooth 10 or so is often helpful.

src/Source/LibJPEG/usage.txt  view on Meta::CPAN

			miscellaneous markers found in the source file, such
			as JFIF thumbnails, Exif data, and Photoshop settings.
			In some files these extra markers can be sizable.
The default behavior is -copy comments.  (Note: in IJG releases v6 and v6a,
jpegtran always did the equivalent of -copy none.)

Additional switches recognized by jpegtran are:
	-outfile filename
	-maxmemory N
	-verbose
	-debug
These work the same as in cjpeg or djpeg.


THE COMMENT UTILITIES

The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
Although the standard doesn't actually define what COM blocks are for, they
are widely used to hold user-supplied text strings.  This lets you add
annotations, titles, index terms, etc to your JPEG files, and later retrieve
them as text.  COM blocks do not interfere with the image stored in the JPEG

src/Source/LibJXR/common/include/wmspecstrings_strict.h  view on Meta::CPAN

#define __transfer(formal)                __allowed(on_parameter_or_return) 
#define __assume_validated(exp)           __allowed(as_statement_with_arg(exp))

/************************************************************************* 
* __analysis_assume(expr) : Expert macro use only when directed. Use this to
* tell static analysis tools like PREfix and PREfast about a non-coded
* assumption that you wish the tools to assume. The assumption will be
* understood by those tools. By default there is no dynamic checking or
* static checking of the assumption in any build.
*
* To obtain dynamic checking wrap this macro in your local version of a debug
* assert.
* Please do not put function calls in the expression because this is not
* supported by all tools:
*  __analysis_assume(GetObject () != NULL); // DO NOT DO THIS
*
*************************************************************************/
#define __analysis_assume(expr) __allowed(as_statement_with_arg(expr))
#define __analysis_assert(expr) __allowed(as_statement_with_arg(expr))

/************************************************************************* 

src/Source/LibJXR/image/sys/common.h  view on Meta::CPAN


/** adaptive huffman encoding / decoding struct **/
typedef struct CAdaptiveHuffman
{
    Int     m_iNSymbols;
    const Int *m_pTable;
    const Int *m_pDelta, *m_pDelta1;
    Int     m_iTableIndex;
    const short *m_hufDecTable;
    Bool    m_bInitialize;
    //Char    m_pLabel[8]; // for debugging - label attached to constructor

    Int     m_iDiscriminant, m_iDiscriminant1;
    Int     m_iUpperBound;
    Int     m_iLowerBound;
} CAdaptiveHuffman;


/************************************************************************************
  Context structures
************************************************************************************/

src/Source/LibOpenJPEG/event.h  view on Meta::CPAN

 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef __EVENT_H
#define __EVENT_H
/**
@file event.h
@brief Implementation of a event callback system

The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user.
*/
/**
Message handler object
used for 
<ul>
<li>Error messages
<li>Warning messages
<li>Debugging messages
</ul>
*/

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN

                return OPJ_FALSE;
        }

        /* Move data and copy one information from codec to output image*/
        for (compno = 0; compno < p_image->numcomps; compno++) {
                p_image->comps[compno].resno_decoded = p_j2k->m_output_image->comps[compno].resno_decoded;
                p_image->comps[compno].data = p_j2k->m_output_image->comps[compno].data;
#if 0
                char fn[256];
                sprintf( fn, "/tmp/%d.raw", compno );
                FILE *debug = fopen( fn, "wb" );
                fwrite( p_image->comps[compno].data, sizeof(OPJ_INT32), p_image->comps[compno].w * p_image->comps[compno].h, debug );
                fclose( debug );
#endif
                p_j2k->m_output_image->comps[compno].data = NULL;
        }

        return OPJ_TRUE;
}

OPJ_BOOL opj_j2k_get_tile(      opj_j2k_t *p_j2k,
                                                    opj_stream_private_t *p_stream,
                                                    opj_image_t* p_image,

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	const opj_tcp_t *tcp = 00;
	const opj_tccp_t * l_tccp = 00;
	const opj_image_comp_t * l_img_comp = 00;

	/* to store l_dx, l_dy, w and h for each resolution and component.*/
	OPJ_UINT32 * lResolutionPtr;

	/* position in x and y of tile*/
	OPJ_UINT32 p, q;

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_image != 00);
	assert(tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	tcp = &p_cp->tcps [tileno];
	l_tccp = tcp->tccps;
	l_img_comp = p_image->comps;

	/* position in x and y of tile*/

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	OPJ_UINT32 l_poc_bound;

	/* pointers to tile coding parameters and components.*/
	opj_pi_iterator_t *l_pi = 00;
	opj_tcp_t *tcp = 00;
	const opj_tccp_t *tccp = 00;

	/* current packet iterator being allocated*/
	opj_pi_iterator_t *l_current_pi = 00;

	/* preconditions in debug*/
	assert(cp != 00);
	assert(image != 00);
	assert(tileno < cp->tw * cp->th);

	/* initializations*/
	tcp = &cp->tcps[tileno];
	l_poc_bound = tcp->numpocs+1;

	/* memory allocations*/
	l_pi = (opj_pi_iterator_t*) opj_calloc((l_poc_bound), sizeof(opj_pi_iterator_t));

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	/* tile coding parameter*/
	opj_tcp_t *l_tcp = 00;
	/* current poc being updated*/
	opj_poc_t * l_current_poc = 00;

	/* number of pocs*/
	OPJ_UINT32 l_poc_bound;

    OPJ_ARG_NOT_USED(p_max_res);

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps [p_tileno];
	/* number of iterations in the loop */
	l_poc_bound = l_tcp->numpocs+1;

	/* start at first element, and to make sure the compiler will not make a calculation each time in the loop
	   store a pointer to the current element to modify rather than l_tcp->pocs[i]*/

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

{
	/* loop*/
	OPJ_UINT32 pino;
	/* tile coding parameter*/
	opj_tcp_t *l_tcp = 00;
	/* current poc being updated*/
	opj_poc_t * l_current_poc = 00;
	/* number of pocs*/
	OPJ_UINT32 l_poc_bound;

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps [p_tileno];

	/* number of iterations in the loop */
	l_poc_bound = l_tcp->numpocs+1;

	/* start at first element, and to make sure the compiler will not make a calculation each time in the loop

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

	OPJ_UINT32 pino;

	/* encoding prameters to set*/
	OPJ_UINT32 l_bound;

	opj_pi_iterator_t * l_current_pi = 00;
	opj_poc_t* l_current_poc = 0;

    OPJ_ARG_NOT_USED(p_max_res);

	/* preconditions in debug*/
	assert(p_pi != 00);
	assert(p_tcp != 00);

	/* initializations*/
	l_bound = p_tcp->numpocs+1;
	l_current_pi = p_pi;
	l_current_poc = p_tcp->pocs;

	for	(pino = 0;pino<l_bound;++pino) {
		l_current_pi->poc.prg = l_current_poc->prg; /* Progression Order #0 */

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

                                   OPJ_UINT32 p_max_precision,
                                   OPJ_UINT32 p_max_res)
{
	/* loop*/
	OPJ_UINT32 pino;

	/* encoding prameters to set*/
	OPJ_UINT32 l_bound;

	opj_pi_iterator_t * l_current_pi = 00;
	/* preconditions in debug*/
	assert(p_tcp != 00);
	assert(p_pi != 00);

	/* initializations*/
	l_bound = p_tcp->numpocs+1;
	l_current_pi = p_pi;

	for (pino = 0;pino<l_bound;++pino) {
		l_current_pi->poc.prg = p_tcp->prg;
		l_current_pi->first = 1;

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN


	/* pointers */
	opj_pi_iterator_t *l_pi = 00;
	opj_tcp_t *l_tcp = 00;
	const opj_tccp_t *l_tccp = 00;
	opj_pi_comp_t *l_current_comp = 00;
	opj_image_comp_t * l_img_comp = 00;
	opj_pi_iterator_t * l_current_pi = 00;
	OPJ_UINT32 * l_encoding_value_ptr = 00;

	/* preconditions in debug */
	assert(p_cp != 00);
	assert(p_image != 00);
	assert(p_tile_no < p_cp->tw * p_cp->th);

	/* initializations */
	l_tcp = &p_cp->tcps[p_tile_no];
	l_bound = l_tcp->numpocs+1;

	l_data_stride = 4 * OPJ_J2K_MAXRLVLS;
	l_tmp_data = (OPJ_UINT32*)opj_malloc(

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN


	/* pointers*/
	opj_pi_iterator_t *l_pi = 00;
	opj_tcp_t *l_tcp = 00;
	const opj_tccp_t *l_tccp = 00;
	opj_pi_comp_t *l_current_comp = 00;
	opj_image_comp_t * l_img_comp = 00;
	opj_pi_iterator_t * l_current_pi = 00;
	OPJ_UINT32 * l_encoding_value_ptr = 00;

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_image != 00);
	assert(p_tile_no < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps[p_tile_no];
	l_bound = l_tcp->numpocs+1;

	l_data_stride = 4 * OPJ_J2K_MAXRLVLS;
	l_tmp_data = (OPJ_UINT32*)opj_malloc(

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Changed several variables to "png_size_t" to show 16/32-bit limitations
  Added new pCAL chunk read/write support
  Added experimental filter selection weighting (Greg Roelofs)
  Removed old png_set_rgbx() and png_set_xrgb() functions that have been
     obsolete for about 2 years now (use png_set_filler() instead)
  Added macros to read 16- and 32-bit ints directly from buffer, to be
    used only on those systems that support it (namely PowerPC and 680x0)
    With some testing, this may become the default for MACOS/PPC systems.
  Only calculate CRC on data if we are going to use it
  Added macros for zTXt compression type PNG_zTXt_COMPRESSION_???
  Added macros for simple libpng debugging output selectable at compile time
  Removed PNG_READ_END_MODE in progressive reader (Smarasderagd)
  More description of info_struct in libpng.txt and png.h
  More instructions in example.c
  More chunk types tested in pngtest.c
  Renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
    png_set_<chunk>.  We now have corresponding png_get_<chunk>
    functions in pngget.c to get information in info_ptr.  This isolates
    the application from the internal organization of png_info_struct
    (good for shared library implementations).

Version 0.96 [May, 1997]
  Fixed serious bug with < 8bpp images introduced in 0.95
  Fixed 256-color transparency bug (Greg Roelofs)
  Fixed up documentation (Greg Roelofs, Laszlo Nyul)
  Fixed "error" in pngconf.h for Linux setjmp() behavior
  Fixed DOS medium model support (Tim Wegner)
  Fixed png_check_keyword() for case with error in static string text
  Added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul)
  Added typecasts to quiet compiler errors
  Added more debugging info

Version 0.97 [January, 1998]
  Removed PNG_USE_OWN_CRC capability
  Relocated png_set_crc_action from pngrutil.c to pngrtran.c
  Fixed typecasts of "new_key", etc. (Andreas Dilger)
  Added RFC 1152 [sic] date support
  Fixed bug in gamma handling of 4-bit grayscale
  Added 2-bit grayscale gamma handling (Glenn R-P)
  Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
  Minor corrections in libpng.txt

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Interchanged the order of calls to png_do_swap() and png_do_shift()
    in pngwtran.c (John Cromer).
  Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h .
  Changed "bad adaptive filter type" from error to warning in pngrutil.c .
  Fixed a documentation error about default filtering with 8-bit indexed-color.
  Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO
    (L. Peter Deutsch).
  Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions.
  Added png_get_copyright() and png_get_header_version() functions.
  Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c
  Added information about debugging in libpng.txt and libpng.3 .
  Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and
    makefile.sco.
  Removed lines after Dynamic Dependencies" in makefile.aco .
  Revised makefile.dec to make a shared library (Jeremie Petit).
  Removed trailing blanks from all files.

Version 1.0.2a [January 6, 1999]
  Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h
  Added "if" tests to silence complaints about unused png_ptr in png.h and png.c
  Changed "check_if_png" function in example.c to return true (nonzero) if PNG.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is
    defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXT_SUPPORTED
    is defined.
  Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory
    overrun when old applications fill the info_ptr->text structure directly.
  Added PNGAPI macro, and added it to the definitions of all exported functions.
  Relocated version macro definitions ahead of the includes of zlib.h and
    pngconf.h in png.h.

Version 1.0.7beta12 [May 12, 2000]
  Revised pngset.c to avoid a problem with expanding the png_debug macro.
  Deleted some extraneous defines from pngconf.h
  Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined.
  Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined.
  Added png_access_version_number() function.
  Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data().
  Expanded libpng.3/libpng.txt information about png_data_freer().

Version 1.0.7beta14 [May 17, 2000] (beta13 was not published)
  Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as
    warnings instead of errors, as pngrutil.c does.
  Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png()
    will actually write IDATs.
  Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

     for indexed-color input files to avoid potential double-freeing trans array
     under some unusual conditions; problem was introduced in version 1.0.6f.
  Further revisions to pngtest.c and files in the wince subdirectory.

Version 1.0.8beta4 [July 14, 2000]
  Added the files pngbar.png and pngbar.jpg to the distribution.
  Added makefile.cygwin, and cygwin support in pngconf.h
  Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)

Version 1.0.8rc1 [July 16, 2000]
  Revised png_debug() macros and statements to eliminate compiler warnings.

Version 1.0.8 [July 24, 2000]
  Added png_flush() in pngwrite.c, after png_write_IEND().
  Updated makefile.hpux to build a shared library.

Version 1.0.9beta1 [November 10, 2000]
  Fixed typo in scripts/makefile.hpux
  Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
  Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
  Changed "cdrom.com" in documentation to "libpng.org"

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
  Bumped dll-number from 2 to 3 in makefile.cygwin
  Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
     if user attempts to run it on an 8-bit display.
  Updated contrib/gregbook
  Use png_malloc instead of png_zalloc to allocate palette in pngset.c
  Updated makefile.ibmc
  Added some typecasts to eliminate gcc 3.0 warnings.  Changed prototypes
     of png_write_oFFS width and height from png_uint_32 to png_int_32.
  Updated example.c
  Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c

Version 1.2.0beta5 [August 8, 2001]
  Revised contrib/gregbook
  Revised makefile.gcmmx
  Revised pnggccrd.c to conditionally compile some thread-unsafe code only
     when PNG_THREAD_UNSAFE_OK is defined.
  Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
     value exceeding 2^bit_depth-1
  Revised makefile.sgi and makefile.sggcc
  Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
  Removed restriction that do_invert_mono only operate on 1-bit opaque files

Version 1.2.0 [September 1, 2001]
  Changed a png_warning() to png_debug() in pnggccrd.c
  Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().

Version 1.2.1beta1 [October 19, 2001]
  Revised makefile.std in contrib/pngminus
  Include background_1 in png_struct regardless of gamma support.
  Revised makefile.netbsd and makefile.macosx, added makefile.darwin.
  Revised example.c to provide more details about using row_callback().

Version 1.2.1beta2 [October 25, 2001]
  Added type cast to each NULL appearing in a function call, except for

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  None.

Version 1.2.2beta1 [February 22, 2002]
  Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
  Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
    libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h
  Revised makefile.darwin to remove "-undefined suppress" option.
  Added checks for gamma and chromaticity values over 21474.83, which exceed
    the limit for PNG unsigned 32-bit integers when encoded.
  Revised calls to png_create_read_struct() and png_create_write_struct()
    for simpler debugging.
  Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)

Version 1.2.2beta2 [February 23, 2002]
  Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths.
  Check for invalid image dimensions in png_get_IHDR.
  Added missing "fi;" in the install target of the SGI makefiles.
  Added install-static to all makefiles that make shared libraries.
  Always do gamma compensation when image is partially transparent.

Version 1.2.2beta3 [March 7, 2002]

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Updated makefile.darwin and removed makefile.macosx from scripts directory.
  Imposed default one million column, one-million row limits on the image
    dimensions, and added png_set_user_limits() function to override them.
  Revised use of PNG_SET_USER_LIMITS_SUPPORTED macro.
  Fixed wrong cast of returns from png_get_user_width|height_max().
  Changed some "keep the compiler happy" from empty statements to returns,
  Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution

Version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004]
  Revised makefile.darwin and makefile.solaris.  Removed makefile.macosx.
  Revised pngtest's png_debug_malloc() to use png_malloc() instead of
    png_malloc_default() which is not supposed to be exported.
  Fixed off-by-one error in one of the conversions to PNG_ROWBYTES() in
    pngpread.c.  Bug was introduced in 1.2.6rc1.
  Fixed bug in RGB to RGBX transformation introduced in 1.2.6rc1.
  Fixed old bug in RGB to Gray transformation.
  Fixed problem with 64-bit compilers by casting arguments to abs()
    to png_int_32.
  Changed "ln -sf" to "ln -f -s" in three makefiles (solaris, sco, so9).
  Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin)
  Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

Version 1.4.0beta26 [August 4, 2008]
  Removed png_push_have_buffer() function in pngpread.c.  It increased the
    compiled library size slightly.
  Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta)
  Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings.
  Updated contrib/visupng/cexcept.h to version 2.0.1
  Added PNG_LITERAL_CHARACTER macros for #, [, and ].

Version 1.4.0beta27 [August 5, 2008]
  Revised usage of PNG_LITERAL_SHARP in pngerror.c.
  Moved newline character from individual png_debug messages into the
    png_debug macros.
  Allow user to #define their own png_debug, png_debug1, and png_debug2.

Version 1.4.0beta28 [August 5, 2008]
  Revised usage of PNG_LITERAL_SHARP in pngerror.c.
  Added PNG_STRING_NEWLINE macro

Version 1.4.0beta29 [August 9, 2008]
  Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers.
  Added PNG_STRING_COPYRIGHT macro.
  Added non-ISO versions of png_debug macros.

Version 1.4.0beta30 [August 14, 2008]
  Added premultiplied alpha feature (Volker Wiendl).

Version 1.4.0beta31 [August 18, 2008]
  Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c
  Removed extra crc check at the end of png_handle_cHRM().  Bug introduced
    in libpng-1.4.0beta20.

Version 1.4.0beta32 [August 19, 2008]

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
    check for all-zero coordinates that is detected by the triangle check.

Version 1.4.0beta41 [November 26, 2008]
  Fixed string vs pointer-to-string error in png_check_keyword().
  Rearranged test expressions in png_check_cHRM_fixed() to avoid internal
    overflows.
  Added PNG_NO_CHECK_cHRM conditional.

Version 1.4.0beta42, 43 [December 1, 2008]
  Merge png_debug with version 1.2.34beta04.

Version 1.4.0beta44 [December 6, 2008]
  Removed redundant check for key==NULL before calling png_check_keyword()
    to ensure that new_key gets initialized and removed extra warning
    (Merge with version 1.2.34beta05 -- Arvan Pritchard).

Version 1.4.0beta45 [December 9, 2008]
  In png_write_png(), respect the placement of the filler bytes in an earlier
    call to png_set_filler() (Jim Barry).

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    PNG_READ_DITHER_SUPPORTED defined.

Version 1.4.0beta48 [February 14, 2009]
  Added new exported function png_calloc().
  Combined several instances of png_malloc(); png_memset() into png_calloc().
  Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24
    but was never defined.

Version 1.4.0beta49 [February 28, 2009]
  Added png_fileno() macro to pngconf.h, used in pngwio.c
  Corrected order of #ifdef's in png_debug definition in png.h
  Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments
    for pcal_params.
  Fixed order of #ifdef directives in the png_debug defines in png.h
    (bug introduced in libpng-1.2.34/1.4.0beta29).
  Revised comments in png_set_read_fn() and png_set_write_fn().

Version 1.4.0beta50 [March 18, 2009]
  Use png_calloc() instead of png_malloc() to allocate big_row_buf when
    reading an interlaced file, to avoid a possible UMR.
  Undid revision of PNG_NO_STDIO version of png_write_flush().  Users
    having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined
    or supply their own flush_fn() replacement.
  Revised libpng*.txt and png.h documentation about use of png_write_flush()

src/Source/LibPNG/CHANGES  view on Meta::CPAN


Version 1.4.0beta69 [July 25, 2009]
  Simplified the new filter-selection test.  This runs faster in the
    common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases.
  Removed extraneous declaration from the new call to png_read_gray_to_rgb()
    (bug introduced in libpng-1.4.0beta67).
  Fixed up xcode project (Alam Arias)
  Added a prototype for png_64bit_product() in png.c

Version 1.4.0beta70 [July 27, 2009]
  Avoid a possible NULL dereference in debug build, in png_set_text_2().
    (bug introduced in libpng-0.95, discovered by Evan Rouault)

Version 1.4.0beta71 [July 29, 2009]
  Rebuilt configure scripts with autoconf-2.64.

Version 1.4.0beta72 [August 1, 2009]
  Replaced *.tar.lzma with *.tar.xz in distribution.  Get the xz codec
    from <http://tukaani.org/xz>.

Version 1.4.0beta73 [August 1, 2009]
  Reject attempt to write iCCP chunk with negative embedded profile length
    (JD Chen) (CVE-2009-5063).

Version 1.4.0beta74 [August 8, 2009]
  Changed png_ptr and info_ptr member "trans" to "trans_alpha".

Version 1.4.0beta75 [August 21, 2009]
  Removed an extra png_debug() recently added to png_write_find_filter().
  Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.

Version 1.4.0beta76 [August 22, 2009]
  Moved an incorrectly located test in png_read_row() in pngread.c

Version 1.4.0beta77 [August 27, 2009]
  Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt,
    and the "noconfig" files from the distribution.
  Moved CMakeLists.txt from scripts into the main libpng directory.
  Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    functions while building libpng.  They need to be tested, especially
    those using compilers other than gcc.
  Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
    They should work but still need to be updated to remove
    references to pnggccrd.c or pngvcrd.c and ASM building.
  Added README.txt to the beos, cbuilder5, netware, and xcode projects warning
    that they need to be updated, to remove references to pnggccrd.c and
    pngvcrd.c and to depend on pngpriv.h
  Removed three direct references to read_info_ptr members in pngtest.c
    that were detected by the new PNG_DEPSTRUCT macro.
  Moved the png_debug macro definitions and the png_read_destroy(),
    png_write_destroy() and png_far_to_near() prototypes from png.h
    to pngpriv.h (John Bowler)
  Moved the synopsis lines for png_read_destroy(), png_write_destroy()
    png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.

Version 1.4.0beta94 [November 9, 2009]
  Removed the obsolete, unused pnggccrd.c and pngvcrd.c files.
  Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
  Removed dependency of pngtest.o on pngpriv.h in the makefiles.
  Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined.

Version 1.4.0beta95 [November 10, 2009]
  Changed png_check_sig() to !png_sig_cmp() in contrib programs.
  Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile

src/Source/LibPNG/CHANGES  view on Meta::CPAN


Version 1.5.0beta11 [March 6, 2010]
  Removed checking for already-included setjmp.h from pngconf.h
  Fixed inconsistent indentations and made numerous cosmetic changes.
  Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5

Version 1.5.0beta12 [March 9, 2010]
  Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from
    the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES"
    and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler).
  Created new pngdebug.h and moved debug definitions there.

Version 1.5.0beta13 [March 10, 2010]
  Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice.
  Revise the "#ifdef" blocks in png_inflate() so it will compile when neither
    PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
    is defined.
  Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3
  Moved the 'config.h' support from pngconf.h to pngpriv.h
  Removed PNGAPI from the png_longjmp_ptr typedef.
  Eliminated dependence of pngtest.c on the private pngdebug.h file.
  Make all png_debug macros into *unterminated* statements or
    expressions (i.e. a trailing ';' must always be added) and correct
    the format statements in various png_debug messages.

Version 1.5.0beta14 [March 14, 2010]
  Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c
  Revised Makefile.am to account for recent additions and replacements.
  Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and
    added ordinal numbers to the Windows DEF file and corrected the duplicated
    ordinal numbers on CE symbols that are commented out.
  Added back in export symbols that can be present in the Windows build but
    are disabled by default.
  PNG_EXPORT changed to include an 'ordinal' field for DEF file generation.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    it was changed from png_charpp to png_const_bytepp in png_set_iCCP().
  Ensure that png_rgb_to_gray ignores palette mapped images, if libpng
    internally happens to call it with one, and fixed a failure to handle
    palette mapped images correctly.  This fixes CVE-2690.

Version 1.5.1beta02 [January 14, 2011]
  Fixed a bug in handling of interlaced images (bero at arklinux.org).
  Updated CMakeLists.txt (Clifford Yapp)

Version 1.5.1beta03 [January 14, 2011]
  Fixed typecasting of some png_debug() statements (Cosmin)

Version 1.5.1beta04 [January 16, 2011]
  Updated documentation of png_set|get_tRNS() (Thomas Klausner).
  Mentioned in the documentation that applications must #include "zlib.h"
    if they need access to anything in zlib.h, and that a number of
    macros such as png_memset() are no longer accessible by applications.
  Corrected pngvalid gamma test "sample" function to access all of the color
    samples of each pixel, instead of sampling the red channel three times.
  Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow"
    warnings, and (mistakenly) changed png_exp() to exp().

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    passed to png_combine_row() are now generated internally, avoiding
    some code duplication and localizing the interlace handling somewhat.
  Align png_struct::row_buf - previously it was always unaligned, caused by
    a bug in the code that attempted to align it; the code needs to subtract
    one from the pointer to take account of the filter byte prepended to
    each row.
  Optimized png_combine_row() when rows are aligned. This gains a small
    percentage for 16-bit and 32-bit pixels in the typical case where the
    output row buffers are appropriately aligned. The optimization was not
    previously possible because the png_struct buffer was always misaligned.
  Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01.

Version 1.5.6beta06 [October 17, 2011]
  Removed two redundant tests for unitialized row.
  Fixed a relatively harmless memory overwrite in compressed text writing
    with a 1 byte zlib buffer.
  Add ability to call png_read_update_info multiple times to pngvalid.c.
  Fixes for multiple calls to png_read_update_info. These fixes attend to
    most of the errors revealed in pngvalid, however doing the gamma work
    twice results in inaccuracies that can't be easily fixed.  There is now
    a warning in the code if this is going to happen.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    header.

Version 1.6.0beta18 [March 16, 2012]
  Issue a png_benign_error() instead of png_warning() about bad palette index.
  In pngtest, treat benign errors as errors if "-strict" is present.
  Fixed an off-by-one error in the palette index checking function.
  Fixed a compiler warning under Cygwin (Windows-7, 32-bit system)
  Revised example.c to put text strings in a temporary character array
    instead of directly assigning string constants to png_textp members.
    This avoids compiler warnings when -Wwrite-strings is enabled.
  Added output flushing to aid debugging under Visual Studio. Unfortunately
    this is necessary because the VS2010 output window otherwise simply loses
    the error messages on error (they weren't flushed to the window before
    the process exited, apparently!)
  Added configuration support for benign errors and changed the read
    default. Also changed some warnings in the iCCP and sRGB handling
    from to benign errors. Configuration now makes read benign
    errors warnings and write benign errors to errors by default (thus
    changing the behavior on read).  The simplified API always forces
    read benign errors to warnings (regardless of the system default, unless
    this is disabled in which case the simplified API can't be built.)

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    except for GCC-4.2.1 work with this version.  The change makes the ANSI-C
    rule that const applied to an array of elements applies instead to the
    elements in the array moot by explicitly applying const to the base
    elements of the png_icc_matrix and png_icc_vector types. The accidental
    (harmless) 'const' previously applied to the parameters of two of the
    functions have also been removed.
  Added a work around for GCC 4.2 optimization bug.
  Marked the broken (bad white point) original HP sRGB profiles correctly and
    correct comments.
  Added -DZ_SOLO to contrib/pngminim/*/makefile to work with zlib-1.2.7
  Use /MDd for vstudio debug builds. Also added pngunkown to the vstudio
    builds, fixed build errors and corrected a minor exit code error in
    pngvalid if the 'touch' file name is invalid.
  Add updated WARNING file to projects/vstudio from libpng 1.5/vstudio
  Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
    pngrtran.c (Domani Hannes).

Version 1.6.0beta31 [November 1, 2012]
  Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30.
  Made pngvalid so that it will build outside the libpng source tree.
  Made builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail).

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Fixed GUIDs in projects/vstudio. Some were duplicated or missing,
    resulting in VS2010 having to update the files.
  Removed non-working ICC profile support code that was mostly added to
    libpng-1.6.0beta29 and beta30. There was too much code for too little
    gain; implementing full ICC color correction may be desireable but is left
    up to applications.

Version 1.6.0beta32 [November 25, 2012]
  Fixed an intermittent SEGV in pngstest due to an uninitialized array element.
  Added the ability for contrib/libtests/makepng.c to make a PNG with just one
    color. This is useful for debugging pngstest color inaccuracy reports.
  Fixed error checking in the simplified write API (Olaf van der Spek)
  Made png_user_version_check() ok to use with libpng version 1.10.x and later.

Version 1.6.0beta33 [December 15, 2012]
  Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX)
    that causes the MALLOC_MAX limit not to work (John Bowler)
  Change png_warning() to png_app_error() in pngwrite.c and comment the
    fall-through condition.
  Change png_warning() to png_app_warning() in png_write_tRNS().
  Rearranged the ARM-NEON optimizations: Isolated the machine specific code

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    adds contrib/conftest/*.dfa files that can be used in automatic build
    scripts to ensure that these configurations continue to build.
  Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder.
  Fixed pngvalid 'fail' function declaration on the Intel C Compiler.
    This reverts to the previous 'static' implementation and works round
    the 'unused static function' warning by using PNG_UNUSED().

Version 1.6.8beta02 [November 30, 2013]
  Removed or marked PNG_UNUSED some harmless "dead assignments" reported
    by clang scan-build.
  Changed tabs to 3 spaces in png_debug macros and changed '"%s"m'
    to '"%s" m' to improve portability among compilers.
  Changed png_free_default() to free() in pngtest.c

Version 1.6.8rc01 [December 12, 2013]
  Tidied up pngfix inits and fixed pngtest no-write builds.

Version 1.6.8rc02 [December 14, 2013]
  Handle zero-length PLTE chunk or NULL palette with png_error()
    instead of png_chunk_report(), which by default issues a warning
    rather than an error, leading to later reading from a NULL pointer

src/Source/LibPNG/CMakeLists.txt  view on Meta::CPAN

endif()
if(DEFINED PNG_STATIC)
  option(PNG_STATIC "Build static lib" ${PNG_STATIC})
else()
  option(PNG_STATIC "Build static lib" ON)
endif()

option(PNG_TESTS  "Build libpng tests" YES)

# Many more configuration options could be added here
option(PNG_DEBUG         "Build with debug output" NO)
option(PNGARG            "Disable ANSI-C prototypes" NO)

# SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})

# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")

# Use the prebuilt pnglibconf.h file from the scripts folder
# TODO: fix this by building with awk; without this no cmake build can be
# configured directly (to do so indirectly use your local awk to build a
# pnglibconf.h in the build directory.)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
               ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})

# OUR SOURCES
set(libpng_public_hdrs
  png.h
  pngconf.h
  ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h
)
set(libpng_sources
  ${libpng_public_hdrs}
  pngdebug.h
  pnginfo.h
  pngpriv.h
  pngstruct.h
  png.c
  pngerror.c
  pngget.c
  pngmem.c
  pngpread.c
  pngread.c
  pngrio.c

src/Source/LibPNG/INSTALL  view on Meta::CPAN


XII. Configuring for compiler xxx:

All includes for libpng are in pngconf.h.  If you need to add, change
or delete an include, this is the place to do it.
The includes that are not needed outside libpng are placed in pngpriv.h,
which is only used by the routines inside libpng itself.
The files in libpng proper only include pngpriv.h and png.h, which
in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h.
As of libpng-1.5.0, pngpriv.h also includes three other private header
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
that previously appeared in the public headers.

XIII. Removing unwanted object code

There are a bunch of #define's in pngconf.h that control what parts of
libpng are compiled.  All the defines end in _SUPPORTED.  If you are
never going to use a capability, you can change the #define to #undef
before recompiling libpng and save yourself code and data space, or
you can turn off individual capabilities with defines that begin with
PNG_NO_.

src/Source/LibPNG/LibPNG.2005.vcproj  view on Meta::CPAN

			>
			<File
				RelativePath=".\png.h"
				>
			</File>
			<File
				RelativePath=".\pngconf.h"
				>
			</File>
			<File
				RelativePath=".\pngdebug.h"
				>
			</File>
			<File
				RelativePath=".\pnginfo.h"
				>
			</File>
			<File
				RelativePath=".\pnglibconf.h"
				>
			</File>

src/Source/LibPNG/LibPNG.2008.vcproj  view on Meta::CPAN

			>
			<File
				RelativePath=".\png.h"
				>
			</File>
			<File
				RelativePath=".\pngconf.h"
				>
			</File>
			<File
				RelativePath=".\pngdebug.h"
				>
			</File>
			<File
				RelativePath=".\pnginfo.h"
				>
			</File>
			<File
				RelativePath=".\pnglibconf.h"
				>
			</File>

src/Source/LibPNG/LibPNG.2013.vcxproj  view on Meta::CPAN

    <ClCompile Include="pngset.c" />
    <ClCompile Include="pngtrans.c" />
    <ClCompile Include="pngwio.c" />
    <ClCompile Include="pngwrite.c" />
    <ClCompile Include="pngwtran.c" />
    <ClCompile Include="pngwutil.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="png.h" />
    <ClInclude Include="pngconf.h" />
    <ClInclude Include="pngdebug.h" />
    <ClInclude Include="pnginfo.h" />
    <ClInclude Include="pnglibconf.h" />
    <ClInclude Include="pngpriv.h" />
    <ClInclude Include="pngstruct.h" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ZLib\ZLib.2013.vcxproj">
      <Project>{33134f61-c1ad-4b6f-9cea-503a9f140c52}</Project>
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
    </ProjectReference>

src/Source/LibPNG/LibPNG.2013.vcxproj.filters  view on Meta::CPAN

      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="png.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pngconf.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pngdebug.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pnginfo.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pnglibconf.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="pngpriv.h">
      <Filter>Header Files</Filter>

src/Source/LibPNG/README  view on Meta::CPAN

      libpng.3      =>  manual page for libpng (includes libpng-manual.txt)
      libpng-manual.txt  =>  Description of libpng and its functions
      libpngpf.3    =>  manual page for libpng's private functions
      png.5         =>  manual page for the PNG format
      png.c         =>  Basic interface functions common to library
      png.h         =>  Library function and interface declarations (public)
      pngpriv.h     =>  Library function and interface declarations (private)
      pngconf.h     =>  System specific library configuration (public)
      pngstruct.h   =>  png_struct declaration (private)
      pnginfo.h     =>  png_info struct declaration (private)
      pngdebug.h    =>  debugging macros (private)
      pngerror.c    =>  Error/warning message I/O functions
      pngget.c      =>  Functions for retrieving info from struct
      pngmem.c      =>  Memory handling functions
      pngbar.png    =>  PNG logo, 88x31
      pngnow.png    =>  PNG logo, 98x31
      pngpread.c    =>  Progressive reading functions
      pngread.c     =>  Read data/helper high-level functions
      pngrio.c      =>  Lowest-level data read I/O functions
      pngrtran.c    =>  Read data transformation functions
      pngrutil.c    =>  Read data utility functions

src/Source/LibPNG/libpng-manual.txt  view on Meta::CPAN

with higher costs are less likely to be chosen over filters with lower
costs, unless their "sum of absolute differences" is that much smaller.
The costs do not necessarily reflect the exact computational speeds of
the various filters, since this would unduly influence the final image
size.

Note that the numbers above were invented purely for this example and
are given only to help explain the function usage.  Little testing has
been done to find optimum values for either the costs or the weights.

Requesting debug printout

The macro definition PNG_DEBUG can be used to request debugging
printout.  Set it to an integer value in the range 0 to 3.  Higher
numbers result in increasing amounts of debugging information.  The
information is printed to the "stderr" file, unless another file
name is specified in the PNG_DEBUG_FILE macro definition.

When PNG_DEBUG > 0, the following functions (macros) become available:

   png_debug(level, message)
   png_debug1(level, message, p1)
   png_debug2(level, message, p1, p2)

in which "level" is compared to PNG_DEBUG to decide whether to print
the message, "message" is the formatted string to be printed,
and p1 and p2 are parameters that are to be embedded in the string
according to printf-style formatting directives.  For example,

   png_debug1(2, "foo=%d", foo);

is expanded to

   if (PNG_DEBUG > 2)
      fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);

When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
can still use PNG_DEBUG to control your own debugging:

   #ifdef PNG_DEBUG
       fprintf(stderr, ...
   #endif

When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed.  There aren't any such statements in
this version of libpng, but if you insert some they will be printed.

VII.  MNG support

The MNG specification (available at http://www.libpng.org/pub/mng) allows
certain extensions to PNG for PNG images that are embedded in MNG datastreams.
Libpng can support some of these extensions.  To enable them, use the
png_permit_mng_features() function:

src/Source/LibPNG/libpng.3  view on Meta::CPAN

with higher costs are less likely to be chosen over filters with lower
costs, unless their "sum of absolute differences" is that much smaller.
The costs do not necessarily reflect the exact computational speeds of
the various filters, since this would unduly influence the final image
size.

Note that the numbers above were invented purely for this example and
are given only to help explain the function usage.  Little testing has
been done to find optimum values for either the costs or the weights.

.SS Requesting debug printout

The macro definition PNG_DEBUG can be used to request debugging
printout.  Set it to an integer value in the range 0 to 3.  Higher
numbers result in increasing amounts of debugging information.  The
information is printed to the "stderr" file, unless another file
name is specified in the PNG_DEBUG_FILE macro definition.

When PNG_DEBUG > 0, the following functions (macros) become available:

   png_debug(level, message)
   png_debug1(level, message, p1)
   png_debug2(level, message, p1, p2)

in which "level" is compared to PNG_DEBUG to decide whether to print
the message, "message" is the formatted string to be printed,
and p1 and p2 are parameters that are to be embedded in the string
according to printf-style formatting directives.  For example,

   png_debug1(2, "foo=%d", foo);

is expanded to

   if (PNG_DEBUG > 2)
      fprintf(PNG_DEBUG_FILE, "foo=%d\en", foo);

When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
can still use PNG_DEBUG to control your own debugging:

   #ifdef PNG_DEBUG
       fprintf(stderr, ...
   #endif

When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed.  There aren't any such statements in
this version of libpng, but if you insert some they will be printed.

.SH VII.  MNG support

The MNG specification (available at http://www.libpng.org/pub/mng) allows
certain extensions to PNG for PNG images that are embedded in MNG datastreams.
Libpng can support some of these extensions.  To enable them, use the
png_permit_mng_features() function:



( run in 1.276 second using v1.01-cache-2.11-cpan-49f99fa48dc )