Search code examples
iosiphoneassetspixel

Can the @3x assets for iPhone 6 plus have odd pixels? i.e. 248 x 171px


I think previously for @2x it was not suggested to use assets with odd pixels. How about now with the @3x assets? When I increased the resolution for my @2x assets, most of them came out with odd pixels. example: 128 x 88 px --> 248 x 171 px, 580 x 80 px -->1125 x 156 px


Solution

  • A few points to consider.

    1. If a 1x image has an odd number of pixels then the 2x image won't since 2 times any number (even or odd) is an even number. So all 2x images end up having an even number of pixels. But a 3x image doesn't follow that rule. If the 1x image has odd pixels, then so will the 3x image. If the 1x image has even pixels then so will the 2x and 3x images.
    2. Your math is off. You seem to be upscaling your images by 1.95 which make no sense. Either triple your 1x images or scale up your 2x images by 1.5, not 1.95.

    This means your 128x88 2x image will be a 192x132 3x image, not 248x171.

    There is no reason why 3x images can't have an odd pixel dimension. Why would it be a problem?