Cropping costumes

I'm trying to create a system to write and read from spritesheets in Snap!, and I was wondering if it was possible to crop costumes? Something like this:
untitled script pic (9)

I've got one that adds borders - I'll modify it to crop

image

x parameters are pixels from left/right edge (1 and -1 mean no cropping)
y parameters are top/bottom

You can use positive distance from left/top edges instead of negative if you wish.

If you need any other options- give me a yell

ProjectName=cropCostume