Today i noticed that my Canon EOS 5D mark II seems to create different image sizes when holding the camera in landscape or portrait mode. The Portrait Image size is always 3753x5634 pixels while the landscape size is 5616x3744 pixels (using RAW images). Wikipedia says that the sensor size of the eos 5dmkii is 5616x3744, so that would mean you would get extra 18 pixels on the longer edge and extra 9 on the shorter edge when holding the camera in portrait mode.
I also found out there are some rare cases (i just found one photo out of >100) where the resolution of an landscape image is also 5634x3753.
Is there any reason why the resolution of the image changes?
edit: from the comments i checked with exiftool. I found the different image sizes shown in darktable, where it is very constitant. With exiftool all images have the same size written in the "Image Size" tag.
But there is also a Sensor Width and Height Field:
Sensor Width : 5792 Sensor Height : 3804 Sensor Left Border : 168 Sensor Top Border : 56 Sensor Right Border : 5783 Sensor Bottom Border : 3799
which is also the same for landscape and portrait. Maybe darktable is calculating with these values somehow and got something wrong in portrait. I think i found a bug in darktable ;)