Why would you know the size if an int* is returned? While the number of pixels is easily calculated, returning an int* would fail in many situations (e.g. 16bit textures).
A safer way would be to return an IImage*, which would require another lock inturn, though, which would return the void* again. But it would allow to pass more information along.
A much better way would be access via some SColor* type, which transparently handles the access. This is more or less already possible, via setPixel. But it's not really efficient. Moreover, all these changes would require heavy rework of the internals of images and textures, so it won't happen before Irrlicht 2.0 probably.