andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Antialiasing technique

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> User Quota
View previous topic :: View next topic  
Author Message
triangul
Newbie


Joined: 13 May 2004
Posts: 1

PostPosted: Thu May 13, 2004 9:06 am    Post subject: Antialiasing technique Reply with quote

Hello,

I just discover PHP, GD, JPGRAPH and your USERQUOTA class.

Well, I found the antialisasing really cool. I just saw that it's a big problem with to produce antialisaing... But it seems you have found a solution that noone have found Wink !

Can you explain your technique ?
Do you think it's possible to perform this antialisaing technique to a .png file who'll be aliasing ( a jpgraph image for ex. ) and save a copy of it ?

//

Also, I found this technique to sharpen an image. If you don't know her, it's really cool...

Bye!
Very Happy
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Wed May 19, 2004 4:11 am    Post subject: Reply with quote

Hi triangul, and welcome to the board!

I must admit that I did not come up with the bit-shift method (the >>) to resize the image - before I saw that I was simply dividing by two, but the result is the same in the end.

Basically the technique is this:

Make canvas double the size you want (or any other size, but double is easy)
Draw onto that canvas your image at double size
Create a new image with the actual size you want
Resample from the large to the final size

The resampling is the key there. The technique uses millions of colours, so when you shrink the image size down you get an anti-aliased effect.

The technique should work on any image you want. All you have to have is an image a bit bigger than the size you'd want it to be and resample it down in size.

JPGraph, I believe, can do anti-aliased lines as standard. so if the version you have doesn't, you might want to look into it.

As for the un-sharp mask; yeah, I've seen that one before and really liked it. I have it on my computer at home and was playing around with it quite a number of months ago. It was when I set about trying to do some guassian blurring and such through PHP... It kinda work, but was slower than a snail in treacle!

Oh well.. Roll on PIMP! Smile

andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> User Quota All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group