Lines Matching refs:DEPTH
37 # 2009-03-11 David: interlaced bit depth < 8 (writing).
38 # 2009-03-10 David: interlaced bit depth < 8 (reading).
150 it is before PNG scanline filtering is applied. When the bit depth
152 bit depth is less than 8, several pixels are packed into each byte;
153 when the bit depth is 16 (the only value more than 8 that is supported
351 Bit depth: from 1 to 16.
376 `bitdepth` specifies the bit depth of the source pixel values.
381 the next highest valid bit depth is selected, and an ``sBIT``
384 values will be rescaled to fit the range of the selected bit depth.
386 The details of which bit depth / colour model combinations the
390 colour mapped images; colour mapped images cannot have bit depth
403 not be set; the bit depth must be 1,2,4, or 8. When a colour
577 "bit depth must be 8 or less for images with palette")
843 This method should not be used when the source image bit depth
844 is not one naturally supported by PNG; the bit depth should be
849 raise Error("write_packed method not suitable for bit depth %d" %
1107 The mode string can also specify the bit depth (overriding how this
1108 function normally derives the bit depth, see below). Appending
1110 any decimal from 1 to 16 can be used to specify the bit depth.
1126 The bit depth of the PNG is normally taken from the array element's
1130 ``array.array`` objects. A 1 byte datatype will give a bit depth of
1131 8, a 2 byte datatype will give a bit depth of 16. If the datatype
1146 overrides the bit depth derived from the element datatype (but
1147 must match *mode* if that also specifies a bit depth).
1762 raise Error("invalid bit depth %d" % self.bitdepth)
1770 raise FormatError("Illegal combination of bit depth (%d)"
1995 This method normally returns pixel values with the bit depth
1997 ``sBIT`` chunk it is inspected and can reduce the bit depth of
1999 the bit depth specified in the ``sBIT`` chunk (PNG nerds should
2000 note a single result bit depth is used for all channels; the
2121 source image has a bit depth < 8 the transformation preserves
2122 all the information; where the source image has bit depth
3580 required = ['WIDTH', 'HEIGHT', 'DEPTH', 'MAXVAL']
3582 DEPTH,MAXVAL = required
3585 raise Error('PAM file must specify WIDTH, HEIGHT, DEPTH, and MAXVAL')
3588 depth = int(header[DEPTH])
3592 depth <= 0 or
3595 'WIDTH, HEIGHT, DEPTH, MAXVAL must all be positive integers')
3596 return 'P7', width, height, depth, maxval
3600 Read a PNM header, returning (format,width,height,depth,maxval).
3601 `width` and `height` are in pixels. `depth` is the number of
3674 depth = (1,3)[type == strtobytes('P6')]
3675 return header[0], header[1], header[2], depth, header[3]
3809 format, width, height, depth, maxval = \
3817 greyscale = depth <= 2
3818 pamalpha = depth in (2,4)