Hi,
I have regular RGB images with 8 bits per channel (jpeg or png format, mapping sRGB) to read.
I use MagickImage Read function to read the image.
When I display Maximum value in MagickImageStatistics, I get values larger than the expected maximum 255 (8 bits), which should not occur.
I tried to specify BitDepth(8) for each channel, unsuccessfully.
I also used MagickSettings with no better result.
Any idea?
More generally, how can I specify the type of the container (let's say Image<Type>) at image declaration? Is it possible with Magick.net?
Thanks a lot
Comments: ** Comment from web user: FT **
I have regular RGB images with 8 bits per channel (jpeg or png format, mapping sRGB) to read.
I use MagickImage Read function to read the image.
When I display Maximum value in MagickImageStatistics, I get values larger than the expected maximum 255 (8 bits), which should not occur.
I tried to specify BitDepth(8) for each channel, unsuccessfully.
I also used MagickSettings with no better result.
Any idea?
More generally, how can I specify the type of the container (let's say Image<Type>) at image declaration? Is it possible with Magick.net?
Thanks a lot
Comments: ** Comment from web user: FT **
Thanks for your reply.
My first question was: if you have a jpeg image with values between 0 and 255 on your hard drive and you read this image with the Q16 version, the values inside the image will be stretched to fit into the 16 bits depth, right? So for instance, the value 255 will become 65535.
My problem then is how could I compute the square of an image? In which image can I put the result?
Let's say my image imIn has values between 0 and 255 (can be coded with 8 bits) if I take the square of it (imIn * imIn pixelwise) I will need an image coded with 16 bits to store the result, right? How can I do that with Magick.net?
Thanks again