Lines Matching full:a
16 in a product, an acknowledgment in the product documentation would be
42 allow implementing a custom lodepng_crc32.
146 Same as the other decode functions, but instead takes a filename as input.
165 Converts raw pixel data into a PNG image in memory. The colortype and bitdepth
194 Converts raw pixel data into a PNG file on disk.
195 Same as the other encode functions, but instead takes a filename as output.
227 Same as the other decode functions, but instead takes a filename as input.
246 Converts 32-bit RGBA raw pixel data into a PNG file on disk.
247 Same as the other encode functions, but instead takes a filename as output.
276 return an error, output a data size > max_output_size and all the data up to that point. This is
277 not hard limit nor a guarantee, but can prevent excessive memory usage. This setting is
311 …unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Defa…
314 unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/
374 unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/
385 /* Makes a temporary LodePNGColorMode that does not need cleanup (no palette) */
391 unsigned char r, unsigned char g, unsigned char b, unsigned char a);
396 If a palette is used, it counts as 1 channel.*/
398 /*is it a grayscale type? (only colortype 0 or 4)*/
402 /*has it got a palette? (only colortype 3)*/
404 /*only returns true if there is a palette and there is a value in the palette with alpha < 255.
411 In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque v…
415 /*Returns the byte size of a raw image buffer with given width, height and color mode*/
419 /*The information of a Time chunk in PNG.*/
448 So when decoding, you may get these in a different color mode than the one you requested
455 When encoding, avoid setting this to an expensive color, such as a non-gray value
457 write the PNG with a more expensive color mode (when auto_convert is on).
459 The decoder does not use this background color to edit the color of pixels. This is a
462 unsigned background_defined; /*is a suggested background color given?*/
471 text_strings, while text_keys are keywords that give a short description what
478 A keyword is minimum 1 character and maximum 79 characters long (plus the
479 additional null terminator). It's discouraged to use a single line length
488 char** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/
506 unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/
520 use these values with a color management library.
526 unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */
530 unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */
551 …PNG does not parse or use the ICC profile (except its color space header field for an edge case), a
560 …PNG color types and a "GRAY" profile for gray PNG color types. If you disable auto_convert, you mu…
562 …enabled (the default), and the ICC profile is not a good match for the pixel data, this will resul…
563 …error if the pixel data has non-gray pixels for a GRAY profile, or a silent less-optimal compressi…
566 …To avoid this do not set an ICC profile in the image unless there is a good reason for it, and whe…
590 For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag
650 …/* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially…
660 …/*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)…
663 …/* maximum size for decompressed text chunks. If a text chunk's text is larger than this, an error…
665 By default it is a value that prevents unreasonably large strings from hogging memory. */
669 …0 to allow any size. By default this is a value that prevents ICC profiles that would be much larg…
683 /*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/
724 /*Get a LodePNGColorStats of the image. The stats must already have been inited.
736 /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than
744 /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with
750 /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette).
754 /*add LodePNG identifier and version as a text chunk, for debugging*/
787 Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and
807 Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const
812 Requirements: &in[pos] must point to start of a chunk, must use regular
814 there is a PLTE chunk, that one must be inspected before tRNS or bKGD.
836 -4 bytes chunk type (ASCII a-z,A-Z only, see below)
884 Input must be at the beginning of a chunk (result of a previous lodepng_chunk_next call,
885 or the 8th byte of a PNG file which always has the first chunk), or alternatively may
886 point to the first byte of the PNG file (which is not a chunk but the magic header, the
891 In a non-corrupt PNG file, the last chunk should have name "IEND".
909 and data separately. The type is a 4-letter string.
924 This zlib part can be used independently to zlib compress and decompress a
930 /*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after us…
938 Either, *out must be NULL and *outsize must be 0, or, *out must be a valid
949 Zlib adds a small header and trailer around the deflate data.
951 Either, *out must be NULL and *outsize must be 0, or, *out must be a valid
965 /*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/
975 Load a file from disk into buffer. The function allocates the out buffer, and
985 Save a file from buffer to disk. Warning, if it exists, this function overwrites
1008 /* Same as other lodepng::decode, but using a State for more settings and information. */
1018 /* Same as other lodepng::encode, but using a State for more settings and information. */
1029 Load a file from disk into an std::vector.
1035 Save the binary data in an std::vector to a file on disk. The file is overwritten
1068 [.] test if there are no memory leaks or security exploits - done a lot but needs to be checked oft…
1110 6.4. A note about 16-bits per channel and endianness
1125 PNG is a file format to store raster images losslessly with good compression,
1128 LodePNG is a PNG codec according to the Portable Network Graphics (PNG)
1143 LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds
1156 on any external library. There are functions to decode and encode a PNG with
1157 a single function call, and extended versions of these functions taking a
1173 *) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw…
1177 *) loading the image from harddisk or decoding it from a buffer from other sources than harddisk
1184 *) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks.
1207 *) some features needed to make a conformant PNG-Editor might be still missing.
1220 using a struct from the C version to avoid exploits and memory leaks.
1223 lodepng::State class which is a LodePNGState with constructor and destructor.
1230 (instead of lodepng.c), and compile it with a C++ compiler.
1233 of lodepng.cpp), and compile it with a C compiler.
1246 -if a struct has a corresponding init function, always call the init function when making a new one
1247 -if a struct has a corresponding cleanup function, call it before the struct disappears to avoid me…
1248 -if a struct has a corresponding copy function, use the copy function instead of "=".
1255 Decoding converts a PNG compressed image to a raw pixel buffer.
1267 *) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use
1286 always works, except if you want it to convert a color PNG to grayscale or to
1287 a palette with missing colors.
1297 There's also a setting color_convert, true by default. If false, no conversion
1306 Encoding converts a raw pixel buffer to a PNG compressed image.
1316 since the encoder input is trusted, the decoder input (a PNG image that could
1322 *) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use
1329 not needed to specify a color type for the PNG since it's automatically chosen,
1338 When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk.
1340 there are translucent colors in the palette), it'll add a tRNS chunk.
1346 including a possible transparent color key and palette you happen to be using in
1366 *) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE
1371 zTXt chunks use zlib compression on the text. This gives a smaller result on
1372 large texts but a larger result on small texts (such as a single program name).
1381 you decode a PNG, you get the result as a raw image in the color type you want,
1382 no matter whether the PNG was encoded with a palette, grayscale or RGBA color.
1390 following conversions: RGB to grayscale is not supported, and converting to a
1391 palette when the palette doesn't have a required color is not supported. This is
1392 not supported on purpose: this is information loss which requires a color
1393 reduction algorithm that is beyond the scope of a PNG encoder (yes, RGB to gray
1406 A PNG image can have many color types, ranging from 1-bit color to 64-bit color,
1409 a certain amount of bits per pixel. If you want the output raw image after
1410 decoding to have another color type, a conversion is done by LodePNG.
1442 encoder (including palette: it can generate a palette if auto_convert is true,
1446 LodePNG will do a color conversion, which follows the rules below, and may
1458 -if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion
1476 -anything to palette when the palette does not have an exact match for a from-color
1482 -anything to a palette, as long as the palette has the requested colors in it
1487 -In the encoder, you can make it save a PNG with any color type by giving the
1497 In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines
1498 have a bit amount that isn't a multiple of 8, then padding bits are used so that each
1499 scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output.
1501 will NOT have these padding bits, e.g. in the case of a 1-bit image with a width
1503 not the first bit of a new byte.
1505 6.4. A note about 16-bits per channel and endianness
1516 colors, the order in which you store R, G, B and A, and so on. Supporting and
1520 endian output of LodePNG to little endian with a for loop. This is certainly not
1530 OK, or a non-zero code if there was an error.
1533 lodepng_error_text: given the numerical error code, it returns a description
1534 of the error in English as a string.
1547 If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG
1552 A PNG chunk has the following layout:
1562 If you have a buffer containing the PNG image data, then the first chunk (the
1564 signature of the PNG and are not part of a chunk. But if you start at byte 8
1565 then you have a chunk, and can check the following things of it.
1579 Get the type of the chunk or compare if it's a certain type
1587 Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical
1594 Get a pointer to the start of the data of the chunk.
1599 Check if the crc is correct or generate a correct one.
1604 Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these
1614 function creates a new chunk with the given parameters and appends it. Type is the 4-letter
1635 When using the decoder to decode a PNG, you can make it store all unknown chunks
1640 If you need it to add a particular chunk that isn't known by LodePNG, you can
1645 LodePNG add a bKGD chunk, set background_defined to true and add the correct
1660 encoder and decoder, this makes a large difference.
1680 The Mingw compiler (a port of gcc for Windows) should be fully supported by
1687 where it wants to use a non-standard function fopen_s instead of the standard C
1760 A quick reference of some settings to set on the LodePNGState
1790 state.encoder.add_id: add LodePNG identifier and version as a text chunk
1807 Some changes aren't backwards compatible. Those are indicated with a (!)
1828 *) 14 jan 2018: allow optionally ignoring a few more recoverable errors
1846 prefix for the custom allocators and made it possible with a new #define to
1853 *) 23 sep 2012: Reduced warnings in Visual Studio a little bit.
1859 *) 22 apr 2012: (!) Made interface more consistent, renaming a lot. Removed
1869 A bug with the PNG filtertype heuristic was fixed, so that it chooses much
1870 better ones (it's quite significant). A setting to do an experimental, slow,
1890 *) 26 apr 2008: added a few more checks here and there to ensure more safety.
1900 *) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A
1911 *) 02 jun 2007: made the encoder add a tag with version by default
1922 Fixed a bug where the end code of a block had length 0 in the Huffman tree.
1925 *) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone.
1930 *) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days:
1940 Fixed a bug of the decoder with 16-bit per color.
1942 *) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the
1944 *) 08 sep 2006: (!) Changed to interface with a Decoder class
1947 *) 29 jul 2006: (!) Changed the interface: image info is now returned as a
1948 struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy.
1972 LodePNG. If you encounter a PNG image that doesn't work properly with this