
Hi there, in the course of getting more familiar with gil 2.0 I started writing a new extension for downsampling (don't if that's the right term) an source image to its unsigned 8 bit counterpart. You would use such an extension when trying to save an image that is using more than 8 bit per channel, e.g. rgb32_image_t. Some file formats only take unsigned 8bit per channel. Attached there is the code I have so far. But there are still some areas where my extension isn't generic enough or even the algorithm fails due to my own short comings. Here are some questions I have: 1. How do I figure out if the src channel type is signed? If it is I would like to add half the value range to all channels and pixels. 2. When dealing with heterogeneous pixel types how can I initializes them generically? 3. How do I compute the unsigned 8bit image type of the src image type? I'm looking for xxx8_image_t. Thanks ahead. Any ideas or suggestions are welcome. Christian