Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/FreeImage/PluginRAS.cpp view on Meta::CPAN
#define RT_EXPERIMENTAL 0xffff // Reserved for testing
// These are the possible colormap types.
// if it's in RGB format, the map is made up of three byte arrays
// (red, green, then blue) that are each 1/3 of the colormap length.
#define RMT_NONE 0 // maplength is expected to be 0
#define RMT_EQUAL_RGB 1 // red[maplength/3], green[maplength/3], blue[maplength/3]
#define RMT_RAW 2 // Raw colormap
#define RESC 128 // Run-length encoding escape character
// ----- NOTES -----
// Each line of the image is rounded out to a multiple of 16 bits.
// This corresponds to the rounding convention used by the memory pixrect
// package (/usr/include/pixrect/memvar.h) of the SunWindows system.
// The ras_encoding field (always set to 0 by Sun's supported software)
// was renamed to ras_length in release 2.0. As a result, rasterfiles
// of type 0 generated by the old software claim to have 0 length; for
// compatibility, code reading rasterfiles must be prepared to compute the
// TRUE length from the width, height, and depth fields.
src/Source/LibJPEG/usage.txt view on Meta::CPAN
file. The maximum size of a COM block is 64K, but you can have as many of
them as you like in one JPEG file.
We provide two utility programs to display COM block contents and add COM
blocks to a JPEG file.
rdjpgcom searches a JPEG file and prints the contents of any COM blocks on
standard output. The command line syntax is
rdjpgcom [-raw] [-verbose] [inputfilename]
The switch "-raw" (or just "-r") causes rdjpgcom to also output non-printable
characters in comments, which are normally escaped for security reasons.
The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG
image dimensions. If you omit the input file name from the command line,
the JPEG file is read from standard input. (This may not work on some
operating systems, if binary data can't be read from stdin.)
wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
Ordinarily, the COM block is added after any existing COM blocks, but you
can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG
file; it does not modify the input file. DO NOT try to overwrite the input
file by directing wrjpgcom's output back into it; on most systems this will
src/Source/LibJXR/image/decode/strdec.c view on Meta::CPAN
size_t *pTable = pSC->pIndexTable;
U32 iEntry = (U32)pSC->cNumBitIO * (pSC->WMISCP.cNumOfSliceMinus1H + 1), i;
// read index table header [0x0001] - 2 bytes
if (getBit32(pIO, 16) != 1)
return ICERR_ERROR;
//iBits = getBit16(pIO, 5) + 1; // how many bits per entry
for(i = 0; i < iEntry; i ++){
readIS_L1(pSC, pIO);
pTable[i] = GetVLWordEsc(pIO, NULL); // escape handling is not important since the respective band is not accessed
}
}
pSC->cHeaderSize = GetVLWordEsc(pIO, NULL); // escape handling is not important
flushToByte(pIO);
pSC->cHeaderSize += getPosRead(pSC->pIOHeader); // get header length
return ICERR_OK;
}
Int StrIODecInit(CWMImageStrCodec* pSC)
{
if(allocateBitIOInfo(pSC) != ICERR_OK){
src/Source/LibJXR/image/encode/strenc.c view on Meta::CPAN
return ICERR_OK;
}
#define PUTBITS putBit16
/*************************************************************************
Write variable length byte aligned integer
*************************************************************************/
static Void PutVLWordEsc(BitIOInfo* pIO, Int iEscape, size_t s)
{
if (iEscape) {
assert(iEscape <= 0xff && iEscape > 0xfc); // fd,fe,ff are the only valid escapes
PUTBITS(pIO, iEscape, 8);
}
else if (s < 0xfb00) {
PUTBITS(pIO, (U32) s, 16);
}
else {
size_t t = s >> 16;
if ((t >> 16) == 0) {
PUTBITS(pIO, 0xfb, 8);
}
src/Source/LibJXR/image/encode/strenc.c view on Meta::CPAN
for(i = 0; i < iEntry; ){
for(l = 0; l < (pSC->WMISCP.bfBitstreamFormat == FREQUENCY && pSC->WMISCP.bProgressiveMode ? pSC->cSB : 1); l ++, i ++)
{
writeIS_L1(pSC, pIO);
PutVLWordEsc(pIO, (pTable[i] <= MINIMUM_PACKET_LENGTH) ? 0xff : 0, iSize[l]);
iSize[l] += (pTable[i] <= MINIMUM_PACKET_LENGTH) ? 0 : pTable[i];
}
}
writeIS_L1(pSC, pIO);
PutVLWordEsc(pIO, 0xff, 0); // escape to end
fillToByte(pIO);
}
return ICERR_OK;
}
Int copyTo(struct WMPStream * pSrc, struct WMPStream * pDst, size_t iBytes)
{
char pData[PACKETLENGTH];
src/Source/LibPNG/pngtest.c view on Meta::CPAN
"\n filtering heuristic (libpng default), compression");
fprintf(STDERR,
" level (zlib default),\n and zlib version (%s)?\n\n",
ZLIB_VERSION);
wrote_question = 1;
}
FCLOSE(fpin);
FCLOSE(fpout);
/* NOTE: the unsupported_chunks escape is permitted here because
* unsupported text chunk compression will result in the compression
* mode being changed (to NONE) yet, in the test case, the result
* can be exactly the same size!
*/
if (strict != 0 && unsupported_chunks == 0)
return (1);
else
return (0);
}
src/Source/LibTIFF4/ChangeLog view on Meta::CPAN
* configure.ac: Applied patch by Brad Smith to improve pkg-config
static linking by adding -lm to Libs.private when needed.
2013-03-05 Tom Lane <tgl@sss.pgh.pa.us>
* html/man/tiff2ps.1.html, html/man/tiffcp.1.html,
html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1,
man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c,
tools/tiffdither.c: Sync tool usage printouts and man pages with
reality (quite a few options had escaped being documented in one
or both places). Per an old report from Miroslav Vadkerti.
2013-01-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* tools/tiff2ps.c:Fix bug in auto rotate option code. Once a
rotation angle was set by the auto rotate check, it was retained
for all pages that followed instead ofa being retested for each
page. Patch by Richard Nolde.
2013-01-18 Frank Warmerdam <warmerdam@google.com>
src/Source/LibWebP/src/utils/huffman_encode.h view on Meta::CPAN
#define WEBP_UTILS_HUFFMAN_ENCODE_H_
#include "../webp/types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Struct for holding the tree header in coded form.
typedef struct {
uint8_t code; // value (0..15) or escape code (16,17,18)
uint8_t extra_bits; // extra bits for escape codes
} HuffmanTreeToken;
// Struct to represent the tree codes (depth and bits array).
typedef struct {
int num_symbols; // Number of symbols.
uint8_t* code_lengths; // Code lengths of the symbols.
uint16_t* codes; // Symbol Codes.
} HuffmanTreeCode;
// Struct to represent the Huffman tree.
( run in 0.501 second using v1.01-cache-2.11-cpan-c21f80fb71c )