image - Crop thumbnail in imagemagick - specify center at X, Y position -


i generate thumbnails website. using following process folder (based on this answer):

mogrify -interlace plane -thumbnail 280x210^  -gravity center -extent 280x210 -quality 85% *.jpg 

this create thumbnails given size (resize , crop).

i have single image version of command:

convert test.jpg -interlace plane -thumbnail 280x210^   -gravity center -extent 280x210 -quality 85%  testout.jpg  

i'm using facedetect positions of faces original image (before creating thumbnails). photos faces have calculated average x, y position of faces center.

now, use position in command above crop pictures smarter. image cropped both sides (-gravity center), use coordinates faces displayed when image cropped.

is there way how can feed imagemagick?

you use -shave remove part of image, face moves center, apply original command.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -