Lines Matching defs:color

86 /*The PNG color types (also used for raw).*/
108 colortype: the desired color type for the raw output image. See explanation on PNG color types.
109 bitdepth: the desired bit depth for the raw output image. See explanation on PNG color types.
157 colortype: the color type of the raw input image. See explanation on PNG color types.
158 bitdepth: the bit depth of the raw input image. See explanation on PNG color types.
315 LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/
323 lodepng_palette_clear, then for each color use lodepng_palette_add.
329 The palette is only supported for color type 3.
335 transparent color key (tRNS)
337 This color uses the same bit depth as the bitdepth value in this struct, which can be 1-bit to 16-bit.
343 The color key is only supported for color types 0 and 2.
345 unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/
346 unsigned key_r; /*red/greyscale component of color key*/
347 unsigned key_g; /*green component of color key*/
348 unsigned key_b; /*blue component of color key*/
358 /*add 1 color to the palette*/
364 /*get the amount of color channels used, based on colortype in the struct.
377 Check if the given color info indicates the possibility of having non-opaque pixels in the PNG image.
380 In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque values,
384 /*Returns the byte size of a raw image buffer with given width, height and color mode*/
385 size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color);
407 LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/
411 suggested background color chunk (bKGD)
412 This color uses the same color mode as the PNG (except alpha channel), which can be 1-bit to 16-bit.
419 The decoder does not use this background color to edit the color of pixels.
421 unsigned background_defined; /*is a suggested background color given?*/
422 unsigned background_r; /*red component of suggested background color*/
423 unsigned background_g; /*green component of suggested background color*/
424 unsigned background_b; /*blue component of suggested background color*/
494 Converts raw buffer from one color type to another color type, based on
495 LodePNGColorMode structs to describe the input and output color type.
496 See the reference manual at the end of this header file to see which color conversions are supported.
499 of the output color type (lodepng_get_bpp)
527 unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/
540 /*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/
559 /*automatically use color type with less bits per pixel if losslessly possible. Default: LAC_AUTO*/
562 LAC_NO, /*use color type user requested*/
563 LAC_ALPHA, /*use color type user requested, but if only opaque pixels and RGBA or grey+alpha, use RGB or grey*/
564 LAC_AUTO, /*use PNG color type that can losslessly represent the uncompressed image the smallest possible*/
571 like AUTO, but never choose palette color type. For small images, encoding
583 Automatically chooses color type that gives smallest amount of bits in the
598 LodePNGAutoConvert auto_convert; /*how to automatically choose output PNG color type, if at all*/
657 getting much more information about the PNG image and color mode.
665 that is in the header chunk of the PNG, such as width, height and color type. The
897 [X] converting color to 16-bit per channel types
898 [ ] read all public PNG chunk types (but never let the color profile and gamma ones touch RGB values)
901 [X] let the "isFullyOpaque" function check color keys and transparent palettes too
924 6. color conversions
925 6.1. PNG color types
926 6.2. color conversions
943 supporting different color types and alpha channel.
976 the colors of the raw image are always RGB or RGBA, no matter what color type
990 *) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw image,
991 or the same color type as the PNG
992 *) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image
993 *) Adam7 interlace and deinterlace for any color type
995 *) support for alpha channels, including RGBA color model, translucent palettes and color keying
1002 PLTE: color palette
1009 bKGD: suggested background color
1023 stored in the pixels, not values modified by system dependent gamma or color models.
1077 *) LodePNGColorMode info_raw: here you can say what color mode of the raw image (the output) you want to get
1087 It contains for example the original color type of the PNG image, text comments,
1088 suggested background color, etc... More details about the LodePNGInfo struct are
1094 When decoding, here you can specify which color type you want
1097 always works, except if you want it to convert a color PNG to greyscale or to
1100 By default, 32-bit color is used for the result.
1111 color type information in the LodePNGInfo.
1132 *) LodePNGColorMode info_raw: here you say what color type of the raw image (the input) has
1140 not needed to specify a color type for the PNG since it's automatically chosen,
1146 colortype and bitdepth, text chunks, time chunk, the color key, the palette, the
1147 background color, the interlace method, unknown chunks, ...
1156 You specify the color type of the raw image that you give to the input here,
1157 including a possible transparent color key and palette you happen to be using in
1160 By default, 32-bit color is assumed, meaning your input has to be in RGBA
1168 automatically choose the smallest possible color mode (including color key) that
1187 6. color conversions
1190 An important thing to note about LodePNG, is that the color type of the PNG, and
1191 the color type of the raw image, are completely independent. By default, when
1192 you decode a PNG, you get the result as a raw image in the color type you want,
1193 no matter whether the PNG was encoded with a palette, greyscale or RGBA color.
1195 color type that gives good compression based on the values of colors and amount
1199 To be able to do this, LodePNG does conversions from one color mode to another.
1200 It can convert from almost any color type to any other color type, except the
1202 palette when the palette doesn't have a required color is not supported. This is
1203 not supported on purpose: this is information loss which requires a color
1209 color, no matter what color type the PNG has. And by default when encoding,
1210 LodePNG automatically picks the best color model for the output PNG, and expects
1212 the color format of the images yourself, you can skip this chapter.
1214 6.1. PNG color types
1217 A PNG image can have many color types, ranging from 1-bit color to 64-bit color,
1218 as well as palettized color modes. After the zlib decompression and unfiltering
1219 in the PNG image is done, the raw pixel data will have that color type and thus
1221 decoding to have another color type, a conversion is done by LodePNG.
1223 The PNG specification gives the following color types:
1231 Bit depth is the amount of bits per pixel per color channel. So the total amount
1234 6.2. color conversions
1238 color types and bit depths in info_png and info_raw to change the default
1242 you need to set the color type and bit depth you want in the LodePNGColorMode,
1245 If, when encoding, you use another color type than the default in the input
1246 image, you need to specify its color type and bit depth in the LodePNGColorMode
1250 If, when encoding, you don't want LodePNG to choose the output PNG color type
1252 to LAC_NONE, and specify the color type you want in the LodePNGInfo of the
1255 If you do any of the above, LodePNG may need to do a color conversion, which
1262 -the colortype and bitdepth in the color field of LodePNGInfo info_png, are those of the PNG
1263 -when encoding, the color type in LodePNGInfo is ignored if auto_convert
1265 -when decoding, the color type in LodePNGInfo is set by the decoder to that of the original
1266 PNG image, but it can be ignored since the raw image has the color type you requested instead
1267 -if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion
1268 between the color types is done if the color types are supported. If it is not
1273 -both encoder and decoder use the same color converter.
1275 Non supported color conversions:
1276 -color to greyscale: no error is thrown, but the result will look ugly because
1278 -anything, to palette when that palette does not have that color in it: in this
1281 Supported color conversions:
1288 If you want no color conversion to be done:
1289 -In the encoder, you can make it save a PNG with any color type by giving the
1290 raw color mode and LodePNGInfo the same color mode, and setting auto_convert to
1292 -In the decoder, you can make it store the pixel data in the same color type
1296 The function lodepng_convert does the color conversion. It is available in the
1303 In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines
1315 for any other color format. The 16-bit values are stored in big endian (most
1578 *) 15 apr 2013: Fixed bug with LAC_ALPHA and color key.
1583 *) 28 jan 2013: Bugfix with color key.
1585 *) 8 okt 2012 (!): Added new filter strategy (entropy) and new auto color mode.
1587 Faster color conversions while decoding. Some internal cleanups.
1599 PNG color model and bit depth, based on the amount and type of colors of the
1643 *) 08 jun 2007: fixed bug with 2- and 4-bit color, and small interlaced images
1661 *) 24 jan 2007: gave encoder an error interface. Added color conversion from any
1663 *) 21 jan 2007: (!) Totally changed the interface. It allows more color types
1675 Fixed a bug of the decoder with 16-bit per color.