# Image resizing method

**URL:** <https://forum.kirupa.com/t/image-resizing-method/274268>\
**Category:** Uncategorized\
**Created:** [October 27, 2008, 9:07pm UTC](https://forum.kirupa.com/t/image-resizing-method/274268 "2008-10-27T21:07:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tenche](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@Tenche](https://forum.kirupa.com/u/Tenche)\
**Post date:** [October 27, 2008, 9:07pm UTC](https://forum.kirupa.com/t/image-resizing-method/274268/1 "2008-10-27T21:07:36Z")

</div>

I’m using a remote XML file to load images.  
I need to know how to center an image no matter it’s width or height.  
I re sized the entire site to about 725×600  
Now my wide images position themselves at the top and they have a black area at the bottom (that is if I resize them to fit into the 700 width of the swf)  
EXAMPLE [http://img399.imageshack.us/img399/2844/picture5aq4.png](http://img399.imageshack.us/img399/2844/picture5aq4.png)  
Long images that I fit in the 600 position themselves to the left and I have a huge gap to the right of them…  
EXAMPLE [http://img152.imageshack.us/img152/8743/picture3dp3.png](http://img152.imageshack.us/img152/8743/picture3dp3.png)  
I need to figure out how to add some action script to center the image in the VERY middle no matter it’s width or height.
