This question already has an answer here:
How can i add to my custom form api in my custom module the default widget from field_image? I am using imagefield_crop module widget and it works in node/add form, but i cannot replicate it in my custom form api.