# Imges pixelate in resizing

**URL:** <https://forum.kirupa.com/t/imges-pixelate-in-resizing/305368>\
**Category:** flash\
**Created:** [February 24, 2010, 6:18am UTC](https://forum.kirupa.com/t/imges-pixelate-in-resizing/305368 "2010-02-24T06:18:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raaz](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@raaz](https://forum.kirupa.com/u/raaz)\
**Post date:** [February 24, 2010, 6:18am UTC](https://forum.kirupa.com/t/imges-pixelate-in-resizing/305368/1 "2010-02-24T06:18:21Z")

</div>

Hi everyone  
i have photo gallery with xml and it work perfect for me but i have simple problem :cry3: like when i resizing my images by stage width or height my images pixelate can any one please help me why the pictures are pixelate?  
i am using this code for resizing

```
    [COLOR=Blue]if[/COLOR] (imageHolder.mainImage.[COLOR=Blue]_height[/COLOR] &gt; [COLOR=Blue]Stage.height[/COLOR]) {
        imageHolder.mainImage.[COLOR=Blue]_width[/COLOR] = [COLOR=Blue]Stage.width[/COLOR];
        imageHolder.mainImage.[COLOR=Blue]_yscale[/COLOR] = imageHolder.mainImage.[COLOR=Blue]_xscale[/COLOR];
    }

    [COLOR=Blue]if[/COLOR] (imageHolder.mainImage.[COLOR=Blue]_height[/COLOR] &lt;= [COLOR=Blue]Stage.height[/COLOR]) {
        imageHolder.mainImage.[COLOR=Blue]_height[/COLOR] = [COLOR=Blue]Stage.height[/COLOR];
        imageHolder.mainImage.[COLOR=Blue]_xscale[/COLOR] = imageHolder.mainImage.[COLOR=Blue]_yscale[/COLOR];
    }

    [COLOR=Blue]if[/COLOR] (imageHolder.mainImage.[COLOR=Blue]_width[/COLOR] &lt; [COLOR=Blue]Stage.width[/COLOR]) {
        imageHolder.mainImage.[COLOR=Blue]_width[/COLOR] = [COLOR=Blue]Stage.width[/COLOR];
        imageHolder.mainImage.[COLOR=Blue]_yscale[/COLOR] = imageHolder.mainImage.[COLOR=Blue]_xscale[/COLOR];
    }

```

Please my project in last mode i have to submit with tomorrow otherwise i will lost a opportunity :cry3::cry3::cry3::cry3::cry3::cry3::cry3::cry3::cry3:

Please
