Fixed calculating bitmap sizes in tests