Home | History | Annotate | Download | only in libpng

Lines Matching refs:bit_depth

20 /* Pack pixels into bytes.  Pass the true bit depth in bit_depth.  The
25 png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
29 if (row_info->bit_depth == 8 &&
32 switch ((int)bit_depth)
155 row_info->bit_depth = (png_byte)bit_depth;
156 row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
165 * true number of bits in bit_depth. The row should be packed
166 * according to row_info->bit_depth. Thus, if you had a row of
168 * would pass 3 as bit_depth, and this routine would translate the
173 png_const_color_8p bit_depth)
184 shift_start[channels] = row_info->bit_depth - bit_depth->red;
185 shift_dec[channels] = bit_depth->red;
188 shift_start[channels] = row_info->bit_depth - bit_depth->green;
189 shift_dec[channels] = bit_depth->green;
192 shift_start[channels] = row_info->bit_depth - bit_depth->blue;
193 shift_dec[channels] = bit_depth->blue;
199 shift_start[channels] = row_info->bit_depth - bit_depth->gray;
200 shift_dec[channels] = bit_depth->gray;
206 shift_start[channels] = row_info->bit_depth - bit_depth->alpha;
207 shift_dec[channels] = bit_depth->alpha;
212 if (row_info->bit_depth < 8)
219 if (bit_depth->gray == 1 && row_info->bit_depth == 2)
222 else if (row_info->bit_depth == 4 && bit_depth->gray == 3)
249 else if (row_info->bit_depth == 8)
318 if (row_info->bit_depth == 8)
363 if (row_info->bit_depth == 8)
412 if (row_info->bit_depth == 8)
459 if (row_info->bit_depth == 8)
519 /* png_byte bit_depth; bit depth of samples */
539 (png_uint_32)png_ptr->bit_depth);