crop image but not centred

Hi, I’m working with the crop function that is possible within applescript, (not in Photoshop, etc).
It’s possible to crop a image, but only from the center.
But I want to be able to make an image crop from the top, botton, left or right side.
Is there somebody, who can tel me where to put the variable to make the choice from where the image is starting to crop?
And what’s the content/script of the variable, kind regards