You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
In version 1.3.1 ITexture::getOriginalSize() returns the size of the texture scaled to the next power of 2.
And ITexture::getSize() returns the original size of the image.
Shouldn't it be like in the versions before and as it is documented?