As mentioned here, we can come up with a more efficient method to convert the images using c++ pointers method. I found that the wrappers are already implemented here, for manipulation using pointers in c++. But they seem to place the same int value over all the pixels. Maybe we need to come up with another wrapper to efficiently convert images ? I would like to work on this wrapper.