When you call ITexture::lock() it returns a void* to the pixel data, but it doesn't give any indication of the size of that data. Now while you can probably use getColorFormat() and getSize() to work this out, it still feels a little unsafe to me.
If I use these functions to calculate data size, I feel like I'm making an assumption about the internal workings and a dangerous one.
I assume this is the correct approach but it would probably be better if lock() output a data size through an int* parameter or something so you could be sure of the size.
