Lines Matching full:a
16 in a product, an acknowledgment in the product documentation would be
99 /*Disable built-in CRC function, in that case a custom implementation of
102 disabled and provide a much smaller implementation externally as said above. You can find such an e…
103 in a comment in the lodepng.c(pp) file in the 'else' case of the searchable LODEPNG_COMPILE_CRC sec…
113 … /*pass -DLODEPNG_NO_COMPILE_CPP to the compiler to disable C++ (not needed if a C-only compiler),
171 Same as the other decode functions, but instead takes a filename as input.
198 Converts raw pixel data into a PNG image in memory. The colortype and bitdepth
227 Converts raw pixel data into a PNG file on disk.
228 Same as the other encode functions, but instead takes a filename as output.
270 Same as the other decode functions, but instead takes a filename as input.
292 Converts 32-bit RGBA raw pixel data into a PNG file on disk.
293 Same as the other encode functions, but instead takes a filename as output.
326 return an error, output a data size > max_output_size and all the data up to that point. This is
327 neither a hard limit nor a guarantee, but can prevent excessive memory usage. This setting is
361 …unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Defa…
364 unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/
426 unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/
437 /* Makes a temporary LodePNGColorMode that does not need cleanup (no palette) */
443 unsigned char r, unsigned char g, unsigned char b, unsigned char a);
448 If a palette is used, it counts as 1 channel.*/
450 /*is it a grayscale type? (only colortype 0 or 4)*/
454 /*has it got a palette? (only colortype 3)*/
456 /*only returns true if there is a palette and there is a value in the palette with alpha < 255.
463 In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque v…
467 /*Returns the byte size of a raw image buffer with given width, height and color mode*/
471 /*The information of a Time chunk in PNG.*/
501 When decoding, you may get these in a different color mode than the one you requested
509 When encoding, avoid setting this to an expensive color, such as a non-gray value
511 write the PNG with a more expensive color mode (when auto_convert is on).
513 The decoder does not use this background color to edit the color of pixels. This is a
516 unsigned background_defined; /*is a suggested background color given?*/
525 text_strings, while text_keys are keywords that give a short description what
532 A keyword is minimum 1 character and maximum 79 characters long (plus the
533 additional null terminator). It's discouraged to use a single line length
542 char ** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/
560 unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/
574 use these values with a color management library.
580 unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */
584 unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */
605 …PNG does not parse or use the ICC profile (except its color space header field for an edge case), a
614 …PNG color types and a "GRAY" profile for gray PNG color types. If you disable auto_convert, you mu…
616 …enabled (the default), and the ICC profile is not a good match for the pixel data, this will resul…
617 …error if the pixel data has non-gray pixels for a GRAY profile, or a silent less-optimal compressi…
620 …To avoid this do not set an ICC profile in the image unless there is a good reason for it, and whe…
641 of the data to store the original bits, and use a good sample depth scaling method such as
655 decoding with a color mode conversion, such as always decoding to RGBA, this metadata still
661 auto_convert to choose a more optimal color mode for the data, because the PNG format has
663 …For example, setting these fields to 10-bit will force the encoder to keep using a 16-bit per chan…
664 color mode, even if the pixel data would in fact fit in a more efficient 8-bit mode.
683 … For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag
743 …/* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially…
753 …/*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)…
756 …/* maximum size for decompressed text chunks. If a text chunk's text is larger than this, an error…
758 By default it is a value that prevents unreasonably large strings from hogging memory. */
762 …0 to allow any size. By default this is a value that prevents ICC profiles that would be much larg…
776 /*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/
818 /*Get a LodePNGColorStats of the image. The stats must already have been inited.
830 /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than
838 /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with
844 /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette).
846 to a grayscale type (1 or 4), this is not done and is ignored. If enabling this,
847 a palette must be present in the info_png.
852 /*add LodePNG identifier and version as a text chunk, for debugging*/
885 Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and
905 Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const
910 Requirements: &in[pos] must point to start of a chunk, must use regular
912 there is a PLTE chunk, that one must be inspected before tRNS or bKGD.
934 -4 bytes chunk type (ASCII a-z,A-Z only, see below)
982 Input must be at the beginning of a chunk (result of a previous lodepng_chunk_next call,
983 or the 8th byte of a PNG file which always has the first chunk), or alternatively may
984 point to the first byte of the PNG file (which is not a chunk but the magic header, the
989 In a non-corrupt PNG file, the last chunk should have name "IEND".
1008 and data separately. The type is a 4-letter string.
1023 This zlib part can be used independently to zlib compress and decompress a
1029 /*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after us…
1037 Either, *out must be NULL and *outsize must be 0, or, *out must be a valid
1048 Zlib adds a small header and trailer around the deflate data.
1050 Either, *out must be NULL and *outsize must be 0, or, *out must be a valid
1064 /*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/
1074 Load a file from disk into buffer. The function allocates the out buffer, and
1087 Save a file from buffer to disk. Warning, if it exists, this function overwrites
1115 /* Same as other lodepng::decode, but using a State for more settings and information. */
1125 /* Same as other lodepng::encode, but using a State for more settings and information. */
1136 Load a file from disk into an std::vector.
1145 Save the binary data in an std::vector to a file on disk. The file is overwritten
1181 [.] test if there are no memory leaks or security exploits - done a lot but needs to be checked oft…
1227 6.4. A note about 16-bits per channel and endianness
1242 PNG is a file format to store raster images losslessly with good compression,
1245 LodePNG is a PNG codec according to the Portable Network Graphics (PNG)
1260 LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds
1273 on any external library. There are functions to decode and encode a PNG with
1274 a single function call, and extended versions of these functions taking a
1290 *) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw…
1294 *) loading the image from harddisk or decoding it from a buffer from other sources than harddisk
1301 *) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks.
1325 *) some features needed to make a conformant PNG-Editor might be still missing.
1335 using a struct from the C version to avoid exploits and memory leaks.
1338 lodepng::State class which is a LodePNGState with constructor and destructor.
1345 (instead of lodepng.c), and compile it with a C++ compiler.
1348 of lodepng.cpp), and compile it with a C compiler.
1361 -if a struct has a corresponding init function, always call the init function when making a new one
1362 -if a struct has a corresponding cleanup function, call it before the struct disappears to avoid me…
1363 -if a struct has a corresponding copy function, use the copy function instead of "=".
1370 Decoding converts a PNG compressed image to a raw pixel buffer.
1382 *) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use
1401 always works, except if you want it to convert a color PNG to grayscale or to
1402 a palette with missing colors.
1412 There's also a setting color_convert, true by default. If false, no conversion
1421 Encoding converts a raw pixel buffer to a PNG compressed image.
1431 since the encoder input is trusted, the decoder input (a PNG image that could
1437 *) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use
1444 not needed to specify a color type for the PNG since it's automatically chosen,
1453 When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk.
1455 there are translucent colors in the palette), it'll add a tRNS chunk.
1461 including a possible transparent color key and palette you happen to be using in
1481 *) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE
1486 zTXt chunks use zlib compression on the text. This gives a smaller result on
1487 large texts but a larger result on small texts (such as a single program name).
1496 you decode a PNG, you get the result as a raw image in the color type you want,
1497 no matter whether the PNG was encoded with a palette, grayscale or RGBA color.
1505 following conversions: RGB to grayscale is not supported, and converting to a
1506 palette when the palette doesn't have a required color is not supported. This is
1507 not supported on purpose: this is information loss which requires a color
1508 reduction algorithm that is beyond the scope of a PNG encoder (yes, RGB to gray
1521 A PNG image can have many color types, ranging from 1-bit color to 64-bit color,
1524 a certain amount of bits per pixel. If you want the output raw image after
1525 decoding to have another color type, a conversion is done by LodePNG.
1557 encoder (including palette: it can generate a palette if auto_convert is true,
1561 LodePNG will do a color conversion, which follows the rules below, and may
1573 -if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion
1591 -anything to palette when the palette does not have an exact match for a from-color
1597 -anything to a palette, as long as the palette has the requested colors in it
1602 -In the encoder, you can make it save a PNG with any color type by giving the
1612 In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines
1613 have a bit amount that isn't a multiple of 8, then padding bits are used so that each
1614 scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output.
1616 will NOT have these padding bits, e.g. in the case of a 1-bit image with a width
1618 not the first bit of a new byte.
1620 6.4. A note about 16-bits per channel and endianness
1631 colors, the order in which you store R, G, B and A, and so on. Supporting and
1635 endian output of LodePNG to little endian with a for loop. This is certainly not
1645 OK, or a non-zero code if there was an error.
1648 lodepng_error_text: given the numerical error code, it returns a description
1649 of the error in English as a string.
1662 If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG
1667 A PNG chunk has the following layout:
1677 If you have a buffer containing the PNG image data, then the first chunk (the
1679 signature of the PNG and are not part of a chunk. But if you start at byte 8
1680 then you have a chunk, and can check the following things of it.
1694 Get the type of the chunk or compare if it's a certain type
1702 Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical
1709 Get a pointer to the start of the data of the chunk.
1714 Check if the crc is correct or generate a correct one.
1719 Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these
1729 function creates a new chunk with the given parameters and appends it. Type is the 4-letter
1750 When using the decoder to decode a PNG, you can make it store all unknown chunks
1755 If you need it to add a particular chunk that isn't known by LodePNG, you can
1760 LodePNG add a bKGD chunk, set background_defined to true and add the correct
1775 encoder and decoder, this makes a large difference.
1795 The Mingw compiler (a port of gcc for Windows) should be fully supported by
1802 where it wants to use a non-standard function fopen_s instead of the standard C
1878 A quick reference of some settings to set on the LodePNGState
1908 state.encoder.add_id: add LodePNG identifier and version as a text chunk
1925 Some changes aren't backwards compatible. Those are indicated with a (!)
1952 *) 14 jan 2018: allow optionally ignoring a few more recoverable errors
1970 prefix for the custom allocators and made it possible with a new #define to
1977 *) 23 sep 2012: Reduced warnings in Visual Studio a little bit.
1983 *) 22 apr 2012: (!) Made interface more consistent, renaming a lot. Removed
1993 A bug with the PNG filtertype heuristic was fixed, so that it chooses much
1994 better ones (it's quite significant). A setting to do an experimental, slow,
2014 *) 26 apr 2008: added a few more checks here and there to ensure more safety.
2024 *) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A
2035 *) 02 jun 2007: made the encoder add a tag with version by default
2046 Fixed a bug where the end code of a block had length 0 in the Huffman tree.
2049 *) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone.
2054 *) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days:
2064 Fixed a bug of the decoder with 16-bit per color.
2066 *) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the
2068 *) 08 sep 2006: (!) Changed to interface with a Decoder class
2071 *) 29 jul 2006: (!) Changed the interface: image info is now returned as a
2072 struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy.
2096 LodePNG. If you encounter a PNG image that doesn't work properly with this