You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use
EntropyCrop()
withImageSharp 3.1.1
, do a 16:9 image conversion, where the object of interest is in focus.Googled but no luck.
I understand that selecting an object of interest is not an easy task, and requires some "magic algorithmery" - is it possible with ImageSharp?
Here is my code:
Output from code: (car is too close to the left)
Desired output: (car is centered, sky heavily reduced, some ground removed)
Original image:
I looked at Cloudinary where this can be accomplished with parameters like so:
ar_16:9 // aspect ratio 16:9
w_746 // resizing width
c_fill // crop: fill -- https://cloudinary.com/documentation/resizing_and_cropping#automatic_gravity_with_the_fill_mode
g_auto // gravity: auto (ImageSharp ResizeOptions.Position added with some magic?) -- https://cloudinary.com/documentation/resizing_and_cropping#automatic_cropping_g_auto
g_auto uses some clever algorithm to pick the most relevant part of an image.
Beta Was this translation helpful? Give feedback.
All reactions