Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

antialias in scaled up images

Status
Not open for further replies.

whirlpool6

Technical User
Sep 2, 2007
58
JP
imagecopyresampled does a very good job in scaling down images, but now im having trouble with the scaled up images... images have no difference than the original one... antialias is also not applied... how can this be done?

thanks a lot...
 
you appreciate that scaling up is never going to be great, I guess!

try turning on antialiasing within GD.
Code:
imageantialias($image, true);

some people have suggested that to create a scaled up image that is 500x500 you should first create an image that is 1000*1000 and then use imagecopyresampled to scale it down to the desired size. the imagecopyresampled function has some neat built-in anti-aliasing and pixel-interpolation code.

 
i have tried this function
Code:
imageantialias($image, true);
but it doesnt do any good. i guess i just dont know how to use it. there is no sample on the web which uses jpg images and use this code. all they have are drawn ellipse or line images.

i have also used imagecopyresampled andit doesnt have any effect on my images. i have really big images and when i doubled their sizes, all the memory of the server was used up. it is just not possible to use that...

does anybody know how to use imageantialias?

thanks a lot.
 
there are reports that say that imageantialias() has no perceivable effect on some builds of GD. I can't say i've ever used it, i'm afraid.

as for the server memory - i can't believe that you have gigabyte size images that you're trying to manipulate with GD. that's does not sound sensible! so i assume you're only hitting the script memory limit. in which case, just change the php.ini setting.
 
nopes... i only got 2mbs to 5mbs images... but still they really consume the memory... nonetheless, ill try to change the limit...

anyway, i still have no clue in imageantialias... i still need help on this...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top