[GIL] copy_and_convert_pixels vs transform_pixels
Hi, What is relation, if any, and differences between these two Boost.GIL algorithms? They seem to be similar or the copy_and_convert_pixels seems like a specialisation of the transform_pixels. Is that correct understanding of these algorithms? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
Hi Mateusz,
transform_pixels is gil's attempt to provide the user with STL like
transform algorithm. You can use any sort of operation you want which
would include pixel conversion.
The scope of copy_and_convert_pixels is suppose to be limited to
converting pixels from one format to another. Sure, you could use this
function for something else but that's not the intended purpose. Also,
copy_and_convert_pixel will use a bunch of conversion algorithms ( see
color_convert.hpp ) automatically. transform_pixels is unaware of such
operations.
Hope this helps,
Christian
the application is for transform_pixels is much bigger than for
copy_and_convert_pixels
On Thu, Sep 27, 2012 at 1:08 PM, Mateusz Loskot
Hi,
What is relation, if any, and differences between these two Boost.GIL algorithms? They seem to be similar or the copy_and_convert_pixels seems like a specialisation of the transform_pixels. Is that correct understanding of these algorithms?
Best regards, -- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 27 September 2012 18:31, Christian Henning
transform_pixels is gil's attempt to provide the user with STL like transform algorithm. You can use any sort of operation you want which would include pixel conversion.
Yes, that's clear to me.
The scope of copy_and_convert_pixels is suppose to be limited to converting pixels from one format to another. Sure, you could use this function for something else but that's not the intended purpose. Also, copy_and_convert_pixel will use a bunch of conversion algorithms ( see color_convert.hpp ) automatically. transform_pixels is unaware of such operations.
OK, but conceptually the copy_and_convert_pixel is a transform function too. I presume it would be possible to implement it using the transform_pixel. So, as you said, the transform_pixel has much wider application scope, indeed. I simply was missing reference between these two from the docs, but I'm fairly sure many users may consider these algorithms as somewhat similar. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
participants (2)
-
Christian Henning
-
Mateusz Loskot