Lines Matching defs:format
31 PixelFormat format;
49 ColorOrder get_pixel_format_color_order(PixelFormat format)
52 if (desc.format == format)
55 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
59 unsigned get_pixel_format_depth(PixelFormat format)
62 if (desc.format == format)
65 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
68 unsigned get_pixel_channels(PixelFormat format)
71 if (desc.format == format)
74 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
77 std::size_t get_pixel_row_bytes(PixelFormat format, std::size_t width)
79 std::size_t depth = get_pixel_format_depth(format) * get_pixel_channels(format);
84 std::size_t get_pixels_from_row_bytes(PixelFormat format, std::size_t row_bytes)
86 std::size_t depth = get_pixel_format_depth(format) * get_pixel_channels(format);
94 return desc.format;
97 throw SaneException("Unknown pixel format %d %d %d", depth, channels,
114 Pixel get_pixel_from_row(const std::uint8_t* data, std::size_t x, PixelFormat format)
116 switch (format) {
166 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
170 void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelFormat format)
172 switch (format) {
234 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
238 RawPixel get_raw_pixel_from_row(const std::uint8_t* data, std::size_t x, PixelFormat format)
240 switch (format) {
267 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
271 void set_raw_pixel_to_row(std::uint8_t* data, std::size_t x, RawPixel pixel, PixelFormat format)
273 switch (format) {
313 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
318 PixelFormat format)
320 switch (format) {
338 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));
343 std::uint16_t pixel, PixelFormat format)
345 switch (format) {
376 throw SaneException("Unknown pixel format %d", static_cast<unsigned>(format));