But I found image.write(Blob) is not good idea in multi-thread. It costs more than 2s when concurrent is more than 1, but less than 10ms when concurrent is 1.
Code: Select all
Blob blob(src, lenOfSrc); Image image(blob); image.resize(targetGeo); ... // for now, i use the following logic to get the raw data: Blob tmpBlob; image.write(&tmpBlob); void* data = tmpBlob.data(); size_t length = tmpBlob.length();
I do not know if i just do the wrong way, please correct me.