$ 0 0 I am guessing that you want to extent your image that is 395x800 to 800x800. You can use extent for that and if you choose the overload that has a gravity you can center the image with Gravity.Center.