"image that I am trying to put a 30x30 box in the center of"
This is unclear to me, do you want the image in the center of the box or the other way around?
If you want to frame the image, do you want to replace the edges of the image with the frame or do you want the frame to extend outside of the image?