Query: Wide images getting cropped #2804
Answered
by
JimBobSquarePants
priyanka107
asked this question in
Q&A
-
Hi, while displaying images, we are resizing based on media width, and using ResizeMode.Crop. But this actually crops wide/narrow images in normal displays. For eg.images having dimensions eg. 1920 x 430px or 1053 x 440px get cropped when resizing to 880 x550 px. |
Beta Was this translation helpful? Give feedback.
Answered by
JimBobSquarePants
Sep 6, 2024
Replies: 1 comment 5 replies
-
Could you please provide some more information. I don’t understand the question. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the additional information; It looks to me like you should be using
ResizeMode.Max
. This constrains the resized image to fit the bounds of the given dimensions maintaining the original aspect ratio.As a side note, i strongly recommend switching to the ImageTagHelper syntax where possible.