I need to import the photos from the gallery into Texture2D format.
- Pass the value of Configuration::getInstance ()->getMaxTextureSize () to the .java file (using JNIHelper).
- Load the image from the .java file and adjust it smaller if the image size is larger than maxTextureSize.
- Convert the resized image to png format and pass the byte data to c++.
- Create image by passing byte data to Image::initWithImageData() and Texture2D with Texture2D::initWithImage().
This method works very well, but the problem is that it is very slow.
Is there any way to speed it up?