Hi All,
In libwebp library there are some color spaces listed (RGB, RGBA, BGR, BGRA, YUV, etc). It also mentions about RBG565, RGBA4444 etc. In the WebPGetInfo API only the height and width of the image is obtained but not the color depth and color space info. Based on height, width and the color depth I want to allocate a buffer to store the info and use it for further processing.
My questions are:
1. How to get the color depth?
2. While encoding how to set the color depth?
3. What are the color spaces supported (grayscale and bw supported?)
Regards,
PrasannaKumar
--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msg/webp-discuss/-/vvdu-wfd8joJ.
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.
Hi All,
In libwebp library there are some color spaces listed (RGB, RGBA, BGR, BGRA, YUV, etc). It also mentions about RBG565, RGBA4444 etc. In the WebPGetInfo API only the height and width of the image is obtained but not the color depth and color space info. Based on height, width and the color depth I want to allocate a buffer to store the info and use it for further processing.
My questions are:
1. How to get the color depth?
2. While encoding how to set the color depth?
3. What are the color spaces supported (grayscale and bw supported?)
Thanks Vikas and Urvang for the detailed information.
I was trying to add WebP support to OpenCV library.
OpenCV needs the
image properties to allocate buffer for decoded data. I think decoding
the image in BGR (OpenCV expects the decoded data in BGR format)
format will make sense. OpenCV pre-allocates the data buffer to store
the image data so I think using WebPDecodeBGRInto will be the apt API.
Thanks Vikas and Urvang for the detailed information.
I was trying to add WebP support to OpenCV library. OpenCV needs the
image properties to allocate buffer for decoded data. I think decoding
the image in BGR (OpenCV expects the decoded data in BGR format)
format will make sense. OpenCV pre-allocates the data buffer to store
the image data so I think using WebPDecodeBGRInto will be the apt API.
On 7 January 2013 23:49, Urvang Joshi <urv...@google.com> wrote:I had a quick look into the code. It seems the code has some
> Someone had started work on a patch for OpenCV 2.2 long back.
> (http://www.atinfinity.info/wiki/index.php?OpenCV%2FPatch%20to%20support%20WebP%20format%20on%20OpenCV%202.2).
limitations. Also the code does not check for the "WEBPVP8 " signature
to determine the file type (at least I am not able to find a place
where the file type is identified).
Still some part of the code can be
reused I guess.
Thanks,
PrasannaKumar
--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
If signature is valid then opencv creates the image decoder object (in this case it is webpdecoder) and then calls readheader member function. In the current code webpdecoder object is created for any image (before confirming that it is webp image). The code will work as readheader function will fail for non webp images. But logically this method destroys the purpose of checking signature (at least that is my thought). If wrong please correct me.
Thanks and Regards,
PrasannaKumar.