imageData and resizing

J. Landman Gay jacque at hyperactivesw.com
Fri Jun 14 18:15:29 EDT 2013


On 6/14/13 8:19 AM, Thomas McGrath III wrote:
> I'm trying to find a solution to images getting messed up after doubling their size for retina and then trying to set the imageData after they have been resized. The images get messed up with either horizontal lines or color shifts.
>
> This works for one image but not for a group of images. As soon as I try to set the imageData of a group of images about half way through the images start to screw up.
>
> set the resizeQuality of image x of group "images" to "best"
> set the lockLoc of image x of group "images" to true
> set the width of image x of group "images" to (the width of image x of group "images" * 2)
> set the height of image x of group "images" to (the height of image x of group "images" * 2)
> set the imageData of image x to tempimage
>
> Any ideas or workarounds???

Usually you get those artifacts if the size of the imagedata doesn't 
exactly match the size of the image container. Maybe rounding is causing 
a few pixels difference during the resize. Is there a reason not to just 
resize the image and leave it that way without setting its imagedata?

Typically, images are saved at retina resolution and scaled down for 
non-retina displays. That retains much better image quality.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list