view release on metacpan or search on metacpan
src/Source/LibJXR/jxrgluelib/JXRMeta.h
src/Source/LibJXR/LibJXR.2005.vcproj
src/Source/LibJXR/LibJXR.2008.vcproj
src/Source/LibJXR/LibJXR.2013.vcxproj
src/Source/LibJXR/LibJXR.2013.vcxproj.filters
src/Source/LibJXR/LICENCE
src/Source/LibJXR/README
src/Source/LibOpenJPEG/AUTHORS
src/Source/LibOpenJPEG/bio.c
src/Source/LibOpenJPEG/bio.h
src/Source/LibOpenJPEG/cidx_manager.c
src/Source/LibOpenJPEG/cidx_manager.h
src/Source/LibOpenJPEG/cio.c
src/Source/LibOpenJPEG/cio.h
src/Source/LibOpenJPEG/dwt.c
src/Source/LibOpenJPEG/dwt.h
src/Source/LibOpenJPEG/event.c
src/Source/LibOpenJPEG/event.h
src/Source/LibOpenJPEG/function_list.c
src/Source/LibOpenJPEG/function_list.h
src/Source/LibOpenJPEG/image.c
src/Source/LibOpenJPEG/image.h
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.h view on Meta::CPAN
double i;
} FICOMPLEX;
#if (defined(_WIN32) || defined(__WIN32__))
#pragma pack(pop)
#else
#pragma pack()
#endif // WIN32
// Indexes for byte arrays, masks and shifts for treating pixels as words ---
// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
#ifndef FREEIMAGE_BIGENDIAN
#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
// Little Endian (x86 / MS Windows, Linux) : BGR(A) order
#define FI_RGBA_RED 2
#define FI_RGBA_GREEN 1
#define FI_RGBA_BLUE 0
#define FI_RGBA_ALPHA 3
#define FI_RGBA_RED_MASK 0x00FF0000
#define FI_RGBA_GREEN_MASK 0x0000FF00
src/Source/FreeImage/PluginJ2K.cpp view on Meta::CPAN
}
parameters.tcp_numlayers++;
parameters.cp_disto_alloc = 1;
// convert the dib to a OpenJPEG image
image = FIBITMAPToJ2KImage(s_format_id, dib, ¶meters);
if(!image) {
return FALSE;
}
// decide if MCT should be used
parameters.tcp_mct = (image->numcomps == 3) ? 1 : 0;
// encode the destination image
// get a J2K compressor handle
c_codec = opj_create_compress(OPJ_CODEC_J2K);
// configure the event callbacks
// catch events using our callbacks (no local context needed here)
opj_set_info_handler(c_codec, NULL, NULL);
src/Source/FreeImage/PluginJP2.cpp view on Meta::CPAN
}
parameters.tcp_numlayers++;
parameters.cp_disto_alloc = 1;
// convert the dib to a OpenJPEG image
image = FIBITMAPToJ2KImage(s_format_id, dib, ¶meters);
if(!image) {
return FALSE;
}
// decide if MCT should be used
parameters.tcp_mct = (image->numcomps == 3) ? 1 : 0;
// encode the destination image
// get a JP2 compressor handle
c_codec = opj_create_compress(OPJ_CODEC_JP2);
// configure the event callbacks
// catch events using our callbacks (no local context needed here)
opj_set_info_handler(c_codec, NULL, NULL);
src/Source/FreeImage/PluginPCD.cpp view on Meta::CPAN
BYTE *y1 = NULL, *y2 = NULL, *cbcr = NULL;
BOOL header_only = (flags & FIF_LOAD_NOPIXELS) == FIF_LOAD_NOPIXELS;
// to make absolute seeks possible we store the current position in the file
long offset_in_file = io->tell_proc(handle);
long seek = 0;
// decide which bitmap in the cabinet to load
switch (flags) {
case PCD_BASEDIV4 :
seek = 0x2000;
width = 192;
height = 128;
break;
case PCD_BASEDIV16 :
seek = 0xB800;
src/Source/FreeImage/PluginPICT.cpp view on Meta::CPAN
//
// Based on PICT loading code from paintlib (http://www.paintlib.de/paintlib/).
//
// Paintlib License:
// The paintlib source code and all documentation are copyright (c) 1996-2002
// Ulrich von Zadow and other contributors.
//
// The paintlib source code is supplied "AS IS". Ulrich von Zadow and other
// contributors disclaim all warranties, expressed or implied, including, without
// limitation, the warranties of merchantability and of fitness for any purpose.
// The authors assume no liability for direct, indirect, incidental, special,
// exemplary, or consequential damages, which may result from the use of paintlib,
// even if advised of the possibility of such damage.
//
// Permission is hereby granted to use, copy, modify, and distribute this source
// code, or portions hereof, for any purpose, without fee, subject to the following
// restrictions:
//
// 1. The origin of this source code must not be misrepresented.
// 2. Altered versions must be plainly marked as such and must not be misrepresented
// as being the original source.
src/Source/FreeImageToolkit/Resize.cpp view on Meta::CPAN
}
*/
}
// calculate x and y offsets; since FreeImage uses bottom-up bitmaps, the
// value of src_offset_y is measured from the bottom of the image
unsigned src_offset_x = src_left;
unsigned src_offset_y = FreeImage_GetHeight(src) - src_height - src_top;
/*
Decide which filtering order (xy or yx) is faster for this mapping.
--- The theory ---
Try to minimize calculations by counting the number of convolution multiplies
if(dst_width*src_height <= src_width*dst_height) {
// xy filtering
} else {
// yx filtering
}
--- The practice ---
Try to minimize calculations by counting the number of vertical convolutions (the most time consuming task)
if(dst_width*dst_height <= src_width*dst_height) {
src/Source/LibJPEG/jdapimin.c view on Meta::CPAN
}
/*
* Set default decompression parameters.
*/
LOCAL(void)
default_decompress_parms (j_decompress_ptr cinfo)
{
int cid0, cid1, cid2;
/* Guess the input colorspace, and set output colorspace accordingly. */
/* Note application may override our guesses. */
switch (cinfo->num_components) {
case 1:
cinfo->jpeg_color_space = JCS_GRAYSCALE;
cinfo->out_color_space = JCS_GRAYSCALE;
break;
case 3:
cid0 = cinfo->comp_info[0].component_id;
cid1 = cinfo->comp_info[1].component_id;
cid2 = cinfo->comp_info[2].component_id;
/* First try to guess from the component IDs */
if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03)
cinfo->jpeg_color_space = JCS_YCbCr;
else if (cid0 == 0x01 && cid1 == 0x22 && cid2 == 0x23)
cinfo->jpeg_color_space = JCS_BG_YCC;
else if (cid0 == 0x52 && cid1 == 0x47 && cid2 == 0x42)
cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */
else if (cid0 == 0x72 && cid1 == 0x67 && cid2 == 0x62)
cinfo->jpeg_color_space = JCS_BG_RGB; /* ASCII 'r', 'g', 'b' */
else if (cinfo->saw_JFIF_marker)
cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
else if (cinfo->saw_Adobe_marker) {
switch (cinfo->Adobe_transform) {
case 0:
cinfo->jpeg_color_space = JCS_RGB;
break;
case 1:
cinfo->jpeg_color_space = JCS_YCbCr;
break;
default:
WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
break;
}
} else {
TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
}
/* Always guess RGB is proper output colorspace. */
cinfo->out_color_space = JCS_RGB;
break;
case 4:
if (cinfo->saw_Adobe_marker) {
switch (cinfo->Adobe_transform) {
case 0:
src/Source/LibJPEG/jdhuff.c view on Meta::CPAN
entropy->saved.last_dc_val[ci] = 0;
}
/* Precalculate decoding info for each block in an MCU of this scan */
for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
ci = cinfo->MCU_membership[blkn];
compptr = cinfo->cur_comp_info[ci];
/* Precalculate which table to use for each block */
entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];
entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];
/* Decide whether we really care about the coefficient values */
if (compptr->component_needed) {
ci = compptr->DCT_v_scaled_size;
i = compptr->DCT_h_scaled_size;
switch (cinfo->lim_Se) {
case (1*1-1):
entropy->coef_limit[blkn] = 1;
break;
case (2*2-1):
if (ci <= 0 || ci > 2) ci = 2;
if (i <= 0 || i > 2) i = 2;
src/Source/LibJPEG/jdinput.c view on Meta::CPAN
compptr->component_needed = TRUE;
/* Mark no quantization table yet saved for component */
compptr->quant_table = NULL;
}
/* Compute number of fully interleaved MCU rows. */
cinfo->total_iMCU_rows = (JDIMENSION)
jdiv_round_up((long) cinfo->image_height,
(long) (cinfo->max_v_samp_factor * cinfo->block_size));
/* Decide whether file contains multiple scans */
if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)
cinfo->inputctl->has_multiple_scans = TRUE;
else
cinfo->inputctl->has_multiple_scans = FALSE;
}
LOCAL(void)
per_scan_setup (j_decompress_ptr cinfo)
/* Do computations that are needed before processing a JPEG scan */
src/Source/LibJPEG/jdmarker.c view on Meta::CPAN
return TRUE;
}
LOCAL(boolean)
get_lse (j_decompress_ptr cinfo)
/* Process an LSE marker */
{
INT32 length;
unsigned int tmp;
int cid;
INPUT_VARS(cinfo);
if (! cinfo->marker->saw_SOF)
ERREXITS(cinfo, JERR_SOF_BEFORE, "LSE");
if (cinfo->num_components < 3) goto bad;
INPUT_2BYTES(cinfo, length, return FALSE);
if (length != 24)
ERREXIT(cinfo, JERR_BAD_LENGTH);
INPUT_BYTE(cinfo, tmp, return FALSE);
if (tmp != 0x0D) /* ID inverse transform specification */
ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);
INPUT_2BYTES(cinfo, tmp, return FALSE);
if (tmp != MAXJSAMPLE) goto bad; /* MAXTRANS */
INPUT_BYTE(cinfo, tmp, return FALSE);
if (tmp != 3) goto bad; /* Nt=3 */
INPUT_BYTE(cinfo, cid, return FALSE);
if (cid != cinfo->comp_info[1].component_id) goto bad;
INPUT_BYTE(cinfo, cid, return FALSE);
if (cid != cinfo->comp_info[0].component_id) goto bad;
INPUT_BYTE(cinfo, cid, return FALSE);
if (cid != cinfo->comp_info[2].component_id) goto bad;
INPUT_BYTE(cinfo, tmp, return FALSE);
if (tmp != 0x80) goto bad; /* F1: CENTER1=1, NORM1=0 */
INPUT_2BYTES(cinfo, tmp, return FALSE);
if (tmp != 0) goto bad; /* A(1,1)=0 */
INPUT_2BYTES(cinfo, tmp, return FALSE);
if (tmp != 0) goto bad; /* A(1,2)=0 */
INPUT_BYTE(cinfo, tmp, return FALSE);
if (tmp != 0) goto bad; /* F2: CENTER2=0, NORM2=0 */
INPUT_2BYTES(cinfo, tmp, return FALSE);
if (tmp != 1) goto bad; /* A(2,1)=1 */
src/Source/LibJPEG/jerror.c view on Meta::CPAN
MessageBox(GetActiveWindow(), buffer, "JPEG Library Error",
MB_OK | MB_ICONERROR);
#else
/* Send it to stderr, adding a newline */
fprintf(stderr, "%s\n", buffer);
#endif
}
/*
* Decide whether to emit a trace or warning message.
* msg_level is one of:
* -1: recoverable corrupt-data warning, may want to abort.
* 0: important advisory messages (always display to user).
* 1: first level of tracing detail.
* 2,3,...: successively more detailed tracing messages.
* An application might override this method if it wanted to abort on warnings
* or change the policy about which messages to display.
*/
METHODDEF(void)
src/Source/LibJPEG/jmemmac.c view on Meta::CPAN
* application's zone, with the exception of the rather small "slop"
* factor computed in jpeg_mem_available(). The application can ensure
* that more space is left over by reducing max_memory_to_use.
*
* Large images are swapped to disk using temporary files and System 7.0+'s
* temporary folder functionality.
*
* Note that jmemmac.c depends on two features of MacOS that were first
* introduced in System 7: FindFolder and the FSSpec-based calls.
* If your application uses jmemmac.c and is run under System 6 or earlier,
* and the jpeg library decides it needs a temporary file, it will abort,
* printing error messages about requiring System 7. (If no temporary files
* are created, it will run fine.)
*
* If you want to use jmemmac.c in an application that might be used with
* System 6 or earlier, then you should remove dependencies on FindFolder
* and the FSSpec calls. You will need to replace FindFolder with some
* other mechanism for finding a place to put temporary files, and you
* should replace the FSSpec calls with their HFS equivalents:
*
* FSpDelete -> HDelete
src/Source/LibJPEG/jmemmgr.c view on Meta::CPAN
/* 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 */
if (ptr->dirty) {
do_sarray_io(cinfo, ptr, TRUE);
ptr->dirty = FALSE;
}
/* Decide what part of virtual array to access.
* Algorithm: if target address > current window, assume forward scan,
* load starting at target address. If target address < current window,
* assume backward scan, load so that target area is top of window.
* Note that when switching from forward write to forward read, will have
* start_row = 0, so the limiting case applies and we load from 0 anyway.
*/
if (start_row > ptr->cur_start_row) {
ptr->cur_start_row = start_row;
} else {
/* use long arithmetic here to avoid overflow & unsigned problems */
src/Source/LibJPEG/jmemmgr.c view on Meta::CPAN
/* 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 */
if (ptr->dirty) {
do_barray_io(cinfo, ptr, TRUE);
ptr->dirty = FALSE;
}
/* Decide what part of virtual array to access.
* Algorithm: if target address > current window, assume forward scan,
* load starting at target address. If target address < current window,
* assume backward scan, load so that target area is top of window.
* Note that when switching from forward write to forward read, will have
* start_row = 0, so the limiting case applies and we load from 0 anyway.
*/
if (start_row > ptr->cur_start_row) {
ptr->cur_start_row = start_row;
} else {
/* use long arithmetic here to avoid overflow & unsigned problems */
src/Source/LibJPEG/jpeglib.h view on Meta::CPAN
/* Master record for a decompression instance */
struct jpeg_decompress_struct {
jpeg_common_fields; /* Fields shared with jpeg_compress_struct */
/* Source of compressed data */
struct jpeg_source_mgr * src;
/* Basic description of image --- filled in by jpeg_read_header(). */
/* Application may inspect these values to decide how to process image. */
JDIMENSION image_width; /* nominal image width (from SOF marker) */
JDIMENSION image_height; /* nominal image height */
int num_components; /* # of color components in JPEG image */
J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */
/* Decompression processing parameters --- these fields must be set before
* calling jpeg_start_decompress(). Note that jpeg_read_header() initializes
* them to default values.
*/
src/Source/LibJPEG/jquant1.c view on Meta::CPAN
} my_cquantizer;
typedef my_cquantizer * my_cquantize_ptr;
/*
* Policy-making subroutines for create_colormap and create_colorindex.
* These routines determine the colormap to be used. The rest of the module
* only assumes that the colormap is orthogonal.
*
* * select_ncolors decides how to divvy up the available colors
* among the components.
* * output_value defines the set of representative values for a component.
* * largest_input_value defines the mapping from input values to
* representative values for a component.
* Note that the latter two routines may impose different policies for
* different components, though this is not currently done.
*/
LOCAL(int)
src/Source/LibJPEG/jquant2.c view on Meta::CPAN
* color space, and repeatedly splits the "largest" remaining box until we
* have as many boxes as desired colors. Then the mean color in each
* remaining box becomes one of the possible output colors.
*
* The second pass over the image maps each input pixel to the closest output
* color (optionally after applying a Floyd-Steinberg dithering correction).
* This mapping is logically trivial, but making it go fast enough requires
* considerable care.
*
* Heckbert-style quantizers vary a good deal in their policies for choosing
* the "largest" box and deciding where to cut it. The particular policies
* used here have proved out well in experimental comparisons, but better ones
* may yet be found.
*
* In earlier versions of the IJG code, this module quantized in YCbCr color
* space, processing the raw upsampled data without a color conversion step.
* This allowed the color conversion math to be done only once per colormap
* entry, not once per pixel. However, that optimization precluded other
* useful optimizations (such as merging color conversion with upsampling)
* and it also interfered with desired capabilities such as quantizing to an
* externally-supplied colormap. We have therefore abandoned that approach.
src/Source/LibJPEG/libjpeg.txt view on Meta::CPAN
it is your responsibility --- jpeg_destroy() won't. Ditto for the error
handler structure.
Typical code:
jpeg_destroy_compress(&cinfo);
8. Aborting.
If you decide to abort a compression cycle before finishing, you can clean up
in either of two ways:
* If you don't need the JPEG object any more, just call
jpeg_destroy_compress() or jpeg_destroy() to release memory. This is
legitimate at any point after calling jpeg_create_compress() --- in fact,
it's safe even if jpeg_create_compress() fails.
* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call
jpeg_abort() which works on both compression and decompression objects.
This will return the object to an idle state, releasing any working memory.
src/Source/LibJPEG/libjpeg.txt view on Meta::CPAN
how to generate a message, only where to send it.
format_message (j_common_ptr cinfo, char * buffer)
Constructs a readable error message string based on the error info
stored in cinfo->err. This method is called by output_message. Few
applications should need to override this method. One possible
reason for doing so is to implement dynamic switching of error message
language.
emit_message (j_common_ptr cinfo, int msg_level)
Decide whether or not to emit a warning or trace message; if so,
calls output_message. The main reason for overriding this method
would be to abort on warnings. msg_level is -1 for warnings,
0 and up for trace messages.
Only error_exit() and emit_message() are called from the rest of the JPEG
library; the other two are internal to the error handler.
The actual message texts are stored in an array of strings which is pointed to
by the field err->jpeg_message_table. The messages are numbered from 0 to
err->last_jpeg_message, and it is these code numbers that are used in the
src/Source/LibJPEG/libjpeg.txt view on Meta::CPAN
might never get to the bottom of the image before being aborted, resulting
in the lower part of the screen being several passes worse than the upper.
In most cases it's probably best to abort an output pass only if the whole
file has arrived and you want to begin the final output pass immediately.
When receiving data across a communication link, we recommend always using
the current input scan number for the output target scan number; if a
higher-quality final pass is to be done, it should be started (aborting any
incomplete output pass) as soon as the end of file is received. However,
many other strategies are possible. For example, the application can examine
the parameters of the current input scan and decide whether to display it or
not. If the scan contains only chroma data, one might choose not to use it
as the target scan, expecting that the scan will be small and will arrive
quickly. To skip to the next scan, call jpeg_consume_input() until it
returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher
number as the target scan for jpeg_start_output(); but that method doesn't
let you inspect the next scan's parameters before deciding to display it.
In buffered-image mode, jpeg_start_decompress() never performs input and
thus never suspends. An application that uses input suspension with
buffered-image mode must be prepared for suspension returns from these
routines:
* jpeg_start_output() performs input only if you request 2-pass quantization
and the target scan isn't fully read yet. (This is discussed below.)
* jpeg_read_scanlines(), as always, returns the number of scanlines that it
was able to produce before suspending.
src/Source/LibJPEG/libjpeg.txt view on Meta::CPAN
all.
If you want to create a "pure" abbreviated image file containing no tables,
just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the
tables. If you want to emit some but not all tables, you'll need to set the
individual sent_table fields directly.
To create an abbreviated image, you must also call jpeg_start_compress()
with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress()
will force all the sent_table fields to FALSE. (This is a safety feature to
prevent abbreviated images from being created accidentally.)
To create a tables-only file, perform the same parameter setup that you
normally would, but instead of calling jpeg_start_compress() and so on, call
jpeg_write_tables(&cinfo). This will write an abbreviated datastream
containing only SOI, DQT and/or DHT markers, and EOI. All the quantization
and Huffman tables that are currently defined in the compression object will
be emitted unless their sent_tables flag is already TRUE, and then all the
sent_tables flags will be set TRUE.
A sure-fire way to create matching tables-only and abbreviated image files
src/Source/LibJPEG/libjpeg.txt view on Meta::CPAN
resulting file will be invalid. For transcoding from an existing JPEG file,
we recommend using jpeg_copy_critical_parameters(). This routine initializes
all the compression parameters to default values (like jpeg_set_defaults()),
then copies the critical information from a source decompression object.
The decompression object should have just been used to read the entire
JPEG input file --- that is, it should be awaiting jpeg_finish_decompress().
jpeg_write_coefficients() marks all tables stored in the compression object
as needing to be written to the output file (thus, it acts like
jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid
emitting abbreviated JPEG files by accident. If you really want to emit an
abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables'
individual sent_table flags, between calling jpeg_write_coefficients() and
jpeg_finish_compress().
Progress monitoring
-------------------
Some applications may need to regain control from the JPEG library every so
often. The typical use of this feature is to produce a percent-done bar or
src/Source/LibJPEG/structure.txt view on Meta::CPAN
2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
allocated during initial setup.
3. realize_virt_arrays will be called at the completion of initial setup.
The above conventions ensure that sufficient information is available
for it to choose a good size for virtual array buffers.
Small objects of any lifespan may be allocated at any time. We expect that
the total space used for small objects will be small enough to be negligible
in the realize_virt_arrays computation.
In a virtual-memory machine, we simply pretend that the available space is
infinite, thus causing realize_virt_arrays to decide that it can allocate all
the virtual arrays as full-size in-memory buffers. The overhead of the
virtual-array access protocol is very small when no swapping occurs.
A virtual array can be specified to be "pre-zeroed"; when this flag is set,
never-yet-written sections of the array are set to zero before being made
available to the caller. If this flag is not set, never-written sections
of the array contain garbage. (This feature exists primarily because the
equivalent logic would otherwise be needed in jdcoefct.c for progressive
JPEG mode; we may as well make it available for possible other uses.)
src/Source/LibOpenJPEG/cidx_manager.c view on Meta::CPAN
/*
* $Id: cidx_manager.c,v 1.4 2014/03/16 12:29:51 drolon Exp $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
* Copyright (c) 2003-2004, Yannick Verschueren
* Copyright (c) 2010-2011, Kaori Hagihara
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
src/Source/LibOpenJPEG/cidx_manager.c view on Meta::CPAN
* @param[in] cio file output handle
*/
void opj_write_cptr(int coff, int clen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int opj_write_cidx( int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen,
opj_event_mgr_t * p_manager )
{
int i;
OPJ_OFF_T lenp;
OPJ_UINT32 len;
opj_jp2_box_t *box;
int num_box = 0;
OPJ_BOOL EPHused;
OPJ_BYTE l_data_header [4];
src/Source/LibOpenJPEG/cidx_manager.h view on Meta::CPAN
/*
* $Id: cidx_manager.h,v 1.4 2014/03/16 12:29:52 drolon Exp $
*
* Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2011, Professor Benoit Macq
* Copyright (c) 2003-2004, Yannick Verschueren
* Copyright (c) 2010-2011, Kaori Hagihara
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
src/Source/LibOpenJPEG/cidx_manager.h view on Meta::CPAN
/*
* Write Codestream index box (superbox)
*
* @param[in] offset offset of j2k codestream
* @param[in] cio file output handle
* @param[in] image image data
* @param[in] cstr_info codestream information
* @param[in] j2klen length of j2k codestream
* @return length of cidx box
*/
int opj_write_cidx( int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen,
opj_event_mgr_t * p_manager );
/*
* Check if EPH option is used
*
* @param[in] coff offset of j2k codestream
* @param[in] markers marker information
* @param[in] marknum number of markers
* @param[in] cio file output handle
* @return true if EPH is used
src/Source/LibOpenJPEG/jp2.c view on Meta::CPAN
static OPJ_BOOL opj_jpip_write_iptr( opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/**
* Write index Finder box
* @param cio the stream to write to.
* @param jp2 the jpeg2000 file codec.
* @param p_manager user event manager.
*/
static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/**
* Write file Index (superbox)
* @param cio the stream to write to.
* @param jp2 the jpeg2000 file codec.
* @param p_manager user event manager.
*/
static OPJ_BOOL opj_jpip_write_fidx(opj_jp2_t *jp2,
src/Source/LibOpenJPEG/jp2.c view on Meta::CPAN
#ifdef USE_JPIP
if( jp2->jpip_on )
opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_iptr );
#endif
opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_write_jp2c );
/* DEVELOPER CORNER, add your custom procedures */
#ifdef USE_JPIP
if( jp2->jpip_on )
{
opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_cidx );
opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jpip_write_fidx );
}
#endif
}
void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
opj_procedure_list_add_procedure(jp2->m_procedure_list,(opj_procedure)opj_jp2_read_header_procedure );
src/Source/LibOpenJPEG/jp2.c view on Meta::CPAN
j2k_codestream_exit = opj_stream_tell(cio);
if (! opj_stream_seek(cio,j2k_codestream_exit,p_manager)) {
opj_event_msg(p_manager, EVT_ERROR, "Failed to seek in the stream.\n");
return OPJ_FALSE;
}
return OPJ_TRUE;
}
static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
OPJ_OFF_T j2k_codestream_exit;
OPJ_BYTE l_data_header [24];
/* preconditions */
assert(jp2 != 00);
assert(cio != 00);
assert(p_manager != 00);
src/Source/LibOpenJPEG/opj_includes.h view on Meta::CPAN
#include "pi.h"
#include "tgt.h"
#include "tcd.h"
#include "t1.h"
#include "dwt.h"
#include "t2.h"
#include "mct.h"
#include "opj_intmath.h"
#ifdef USE_JPIP
#include "cidx_manager.h"
#include "indexbox_manager.h"
#endif
/* JPWL>> */
#ifdef USE_JPWL
#include "openjpwl/jpwl.h"
#endif /* USE_JPWL */
/* <<JPWL */
/* V2 */
src/Source/LibPNG/CHANGES view on Meta::CPAN
The shared-library makefiles were linking to libpng.so.0 instead of
libpng.so.3 compatibility as the library.
Version 1.2.11beta2 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
Version 1.2.11beta3 [June 5, 2006]
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
Removed the accidental leftover Makefile.in~ (Cosmin).
Avoided potential buffer overflow and optimized buffer in
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
Removed the include directories and libraries from CFLAGS and LDFLAGS
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
Version 1.2.11beta4 [June 6, 2006]
Allow zero-length IDAT chunks after the entire zlib datastream, but not
after another intervening chunk type.
Version 1.0.19rc1, 1.2.11rc1 [June 13, 2006]
src/Source/LibPNG/CHANGES view on Meta::CPAN
Version 1.4.0beta100 [November 14, 2009]
Removed ASM builds from projects/visualc6 and projects/visualc71
Removed scripts/makefile.nommx and makefile.vcawin32
Revised CMakeLists.txt to account for new location of libpng-config.in
and libpng-pc.in
Updated INSTALL to reflect removal and relocation of files.
Version 1.4.0beta101 [November 14, 2009]
Restored the binary files (*.jpg, *.png, some project files) that were
accidentally deleted from the zip and 7z distributions when the xcode
project was added.
Version 1.4.0beta102 [November 18, 2009]
Added libpng-config.in and libpng-pc.in to the zip and 7z distributions.
Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100.
Moved descriptions of makefiles and other scripts out of INSTALL into
scripts/README.txt
Updated the copyright year in scripts/pngwin.rc from 2006 to 2009.
Version 1.4.0beta103 [November 21, 2009]
src/Source/LibPNG/CHANGES view on Meta::CPAN
calls to spurious functions if all transforms are disabled and slightly
simplifies those functions. Pngvalid modified to handle this.
A minor change is to stop the strip_16 and expand_16 interfaces from
disabling each other; this allows the future alpha premultiplication
code to use 16-bit intermediate values while still producing 8-bit output.
png_do_background and png_do_gamma have been simplified to take a single
pointer to the png_struct rather than pointers to every item required
from the png_struct. This makes no practical difference to the internal
code.
A serious bug in the pngvalid internal routine 'standard_display_init' has
been fixed - this failed to initialize the red channel and accidentally
initialized the alpha channel twice.
Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to
avoid a possible clash with the png_jmpbuf macro on some platforms.
Version 1.5.3beta05 [May 6, 2011]
Added the "_POSIX_SOURCE" feature test macro to ensure libpng sees the
correct API. _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and
pngvalid.c to ensure that POSIX conformant systems disable non-POSIX APIs.
Removed png_snprintf and added formatted warning messages. This change adds
internal APIs to allow png_warning messages to have parameters without
src/Source/LibPNG/CHANGES view on Meta::CPAN
Do not use __restrict when GNUC is <= 3.1
Removed references to png_zalloc() and png_zfree() from the manual.
Fixed configurations where floating point is completely disabled. Because
of the changes to support symbol prefixing PNG_INTERNAL_FUNCTION declares
floating point APIs during libpng builds even if they are completely
disabled. This requires the png floating point types (png_double*) to be
declared even though the functions are never actually defined. This
change provides a dummy definition so that the declarations work, yet any
implementation will fail to compile because of an incomplete type.
Re-eliminated the use of strcpy() in pngtest.c. An unncessary use of
strcpy() was accidentally re-introduced in libpng16; this change replaces
it with strncpy().
Eliminated use of png_sizeof(); use sizeof() instead.
Use a consistent style for (sizeof type) and (sizeof (array))
Cleanup of png_set_filler(). This function does very different things on
read and write. In libpng 1.6 the two cases can be distinguished and
considerable code cleanup, and extra error checking, is possible. This
makes calls on the write side that have no effect be ignored with a
png_app_error(), which can be disabled in the app using
png_set_benign_errors(), and removes the spurious use of usr_channels
on the read side.
src/Source/LibPNG/CHANGES view on Meta::CPAN
part plus guessing a gAMA value requires code to pass selected RGB values
through the profile.
Version 1.6.0beta30 [October 24, 2012]
Changed ICC profile matrix/vector types to not depend on array type rules.
By the ANSI-C standard the new types should be identical to the previous
versions, and all known versions of gcc tested with the previous versions
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
src/Source/LibPNG/LICENSE view on Meta::CPAN
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
src/Source/LibPNG/libpng-manual.txt view on Meta::CPAN
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);
src/Source/LibPNG/libpng.3 view on Meta::CPAN
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);
src/Source/LibPNG/libpng.3 view on Meta::CPAN
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and
src/Source/LibPNG/png.h view on Meta::CPAN
* Andreas Dilger
* Dave Martindale
* Guy Eric Schalnat
* Paul Schmidt
* Tim Wegner
*
* The PNG Reference Library is supplied "AS IS". The Contributing Authors
* and Group 42, Inc. disclaim all warranties, expressed or implied,
* including, without limitation, the warranties of merchantability and of
* fitness for any purpose. The Contributing Authors and Group 42, Inc.
* assume no liability for direct, indirect, incidental, special, exemplary,
* or consequential damages, which may result from the use of the PNG
* Reference Library, even if advised of the possibility of such damage.
*
* Permission is hereby granted to use, copy, modify, and distribute this
* source code, or portions hereof, for any purpose, without fee, subject
* to the following restrictions:
*
* 1. The origin of this source code must not be misrepresented.
*
* 2. Altered versions must be plainly marked as such and must not
src/Source/LibPNG/pngpriv.h view on Meta::CPAN
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
* "ideal" and "delta" should be constants, normally simple
* integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
/* Conversions between fixed and floating point, only defined if
* required (to make sure the code doesn't accidentally use float
* when it is supposedly disabled.)
*/
#ifdef PNG_FLOATING_POINT_SUPPORTED
/* The floating point conversion can't overflow, though it can and
* does lose accuracy relative to the original fixed point value.
* In practice this doesn't matter because png_fixed_point only
* stores numbers with very low precision. The png_ptr and s
* arguments are unused by default but are there in case error
* checking becomes a requirement.
*/