i want image fill pad vertically and not crop


1 comment

  • Avatar
    Raz Ziv


    The result of c_fill_pad is highly dependant on the dimensions of the original image and the dimensions requested in the transformations, or more precisely to the difference between the aspect ratios.
    It will first try and fill the dimensions given while cropping based on the gravity given, but if it notices that this requires cutting too much of the original image, it will pad where needed instead.
    If your image is not too different in its aspect ratio than what you specify in the transformation, it will most likely just fill the dimensions with the original image, cropping some parts out without the need to pad.
    So in case you only want to pad whenever the aspect ratios are different, without ever cropping the original image, you should consider using plain c_pad instead of c_fill_pad.

    Let me know if you got better results with this approach?

    Comment actions Permalink

Please sign in to leave a comment.