Resize image

hi,

resize an image inserted with newImageRect and using image: scale (scaleX, scaleY) to resize it, the image loses greatly in quality. I need to find an alternative method to resize the image while maintaining an acceptable quality.

Thank you!

bye

What does your config.lua look like?

Are you using dynamic scaling? (@2x, @4x images).

How big are you scaling it to?  Blowing images up isn’t a good thing usually.  Shrinking them down is usually okay.

What kind of graphic is it?  Is it a photo or and image with lots of details/texture or is it more like a vector type graphic converted to an image?  There are some things you can set that changes the rescaling method that will work well on some images.  See:
 

http://docs.coronalabs.com/api/library/display/setDefault.html

and look at the “magTextureFilter” and “minTextureFilter” options too.

I mean….I chose to use just one single image in max. resolution and resize it for all the devices…

In certain cases, quality is high enough, but still not perfect. Can you tell me why?

(I also used   “magTextureFilter”  and  “minTextureFilter”**  a**nd but nothing changes)

thank you

Can you show us a graphic that you’re trying to use?

Can you post your config.lua file?

What size in width and height of an image that looks bad?

What devices does it look good on?

What devices does it look bad on?

What version of Corona SDK are you using?

Are you looking at it on device or in the simulator? 

If the simulator what skin are you using?

What about the zoom factor?

My config.lua is:

application =

{

        content =

        {

                width = 640,

                height = 960,

                scale = “Letterbox”,

                fps = 30,

                antialias = true,

                

                

        },

}

I’m using only one image, 2048x1156, and I resize it for all devices.

Quality on iphone4 is quite good, but on galaxy S2 it’s horrible.

Corona Version 2013.1137 (2013.6.7).

thank you

have you tried leaving the anti-alias off?  Also the scale = “Letterbox” may be case sensitive, so you might want to try and all lowercase “letterbox”.

Different devices have different GPUs (graphic processing units) and you’re asking the device to downscale your image by over a 2.4:1 ratio (and even more so on the S2 (3.2:1) and that could be enough to make the image look poorly.  Also if you are doing this to avoid providing multiple resolution images for dyname scaling (@2x and @4x images), you should keep in mind that older devices have slower processors and less memory and making them chew on these large images is going to potentially make them sluggish. 

What does your config.lua look like?

Are you using dynamic scaling? (@2x, @4x images).

How big are you scaling it to?  Blowing images up isn’t a good thing usually.  Shrinking them down is usually okay.

What kind of graphic is it?  Is it a photo or and image with lots of details/texture or is it more like a vector type graphic converted to an image?  There are some things you can set that changes the rescaling method that will work well on some images.  See:
 

http://docs.coronalabs.com/api/library/display/setDefault.html

and look at the “magTextureFilter” and “minTextureFilter” options too.

I mean….I chose to use just one single image in max. resolution and resize it for all the devices…

In certain cases, quality is high enough, but still not perfect. Can you tell me why?

(I also used   “magTextureFilter”  and  “minTextureFilter”**  a**nd but nothing changes)

thank you

Can you show us a graphic that you’re trying to use?

Can you post your config.lua file?

What size in width and height of an image that looks bad?

What devices does it look good on?

What devices does it look bad on?

What version of Corona SDK are you using?

Are you looking at it on device or in the simulator? 

If the simulator what skin are you using?

What about the zoom factor?

My config.lua is:

application =

{

        content =

        {

                width = 640,

                height = 960,

                scale = “Letterbox”,

                fps = 30,

                antialias = true,

                

                

        },

}

I’m using only one image, 2048x1156, and I resize it for all devices.

Quality on iphone4 is quite good, but on galaxy S2 it’s horrible.

Corona Version 2013.1137 (2013.6.7).

thank you

have you tried leaving the anti-alias off?  Also the scale = “Letterbox” may be case sensitive, so you might want to try and all lowercase “letterbox”.

Different devices have different GPUs (graphic processing units) and you’re asking the device to downscale your image by over a 2.4:1 ratio (and even more so on the S2 (3.2:1) and that could be enough to make the image look poorly.  Also if you are doing this to avoid providing multiple resolution images for dyname scaling (@2x and @4x images), you should keep in mind that older devices have slower processors and less memory and making them chew on these large images is going to potentially make them sluggish.