Please tell us who knows how to stretch the image proportionally so that it is not flattened.

    2 answers 2

    increase / decrease one of the dimensions, either height or width, and the other does not specify at all.

    • one
      There is still a little-known, but generally an intuitive way - style="width: NNpx; height: auto;" - Sh4dow
    • @ Sh4dow yes, there is, thanks for the clarification. - FLK
    • @FLK, @ Sh4dow, thank you, when I didn’t have guessed it myself before ... in the photo * the opera resized the picture))) - SurPaul

    If the script, then here we have the original image and we know its size. We divide the height by the length or vice versa. We got a ratio factor. Then we change one of the sides and use it and the coefficient for the other side. Example:

    233x411 К:0.57 (высота к длине, т.е. высота=0.57*длина) Изменяем длину = 500, то длина будет = 0.57 **500 = 285