
27 Dec
2010
27 Dec
'10
9:34 a.m.
Hi Szymon,
On Sun, Dec 26, 2010 at 8:39 PM, Szymon Gatner
Is it possible to find out which of allowed image formats any_image actually has?
For example, if image is loaded with code provided in dynamic_image.cpp:
typedef boost::mpl::vector
my_images_t; any_image
dynamic_img; jpeg_read_image("test.jpg",dynamic_img); how to figure out which colorspace / layout loaded image have?
An any_image is derived from gil::variant which lets you get the index from the type vector you specified. There also is a member called "current_type_is()". But normally you don't need to cast an any_image to a specific type since it should behave like a normal image or view. Let me know if you have more questions. Regards, Christian