When an image has clear borders, pdc seems to be trimming the clear borders of the mask image at compile time.
During runtime, when the image gets loaded, image:getMaskImage():getSize() reports the same size as image:getSize(),however image:getMaskImage()is actually smaller due to the trimmed borders.
This can be confirmed by drawing on the 0,0 of the mask image, which will be aligned with the 0,0 of the trimmed image instead of the actual one.
This behaviour is problematic because it makes it impossible to draw to the mask image in a way that is aligned with the source image, since the offsets of the cropped image and its size are not known.