![]() If you want to resize only one dimension, and keep the other dimension at its original size (rather than the automatic determination described above), you can specify only width or only height, and add the fl_ignore_aspect_ratio flag qualifier. If ar < 1, the original height is maintained, and the width is cropped accordingly. If you provide only the aspect ratio: If ar > 1, the original width is maintained and the height is cropped to deliver the requested ratio.For example, if your original asset is 400*600, then specifying c_crop,w_200 is the same as specifying c_crop,w_200,h_300. If you provide only width or only height, then the other dimension is automatically calculated to deliver the original aspect ratio.However, in rare cases, you may choose to specify only one of these 3 resize qualifiers, and Cloudinary will automatically determine the missing dimension as follows: In most cases, you will specify both width and height or width/height along with an aspect ratio to define the exact required dimensions. ![]() a decimal value representing the ratio of the width divided by the height (e.g., ar_1.33 or ar_2.5).a:b where a signifies the relative width and b the relative height (e.g., ar_4:3 or ar_16:9).Aspect ratios are specified using the ar (aspect ratio) parameter, as follows:.This may be useful when applying chained transformations or setting the dimensions of an overlay. For example, w_iw sets the width to the same value as the original width of the image. Using ih or iw as values sets the dimension to the initial height or initial width of the original image respectively.For example, w_0.5 sets the width to half the original width. Using a decimal value for width or height sets the new dimension relative to the original dimension.For example, w_150 sets the width to exactly 150 pixels. Using an integer value for w (width) or h (height) sets the new dimension to that number in pixels.You can set the target dimensions of your resized image by specifying width, height, and/or the target aspect ratio as qualifiers of your resize transformation. To help you learn about the different cropping and resizing modes, try out the interactive demo. User-defined variables and arithmetic transformations.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |