In the crop function, remove the black background

There are some pretty good instructions in this recent post. Start by setting a video mode that matches the resolution of the area you want to crop.