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.


square crop

 
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 -> Crop Canvas
View previous topic :: View next topic  
Author Message
guildford
Newbie


Joined: 10 Jun 2004
Posts: 12
Location: Melbourne, Australia

PostPosted: Thu Jun 10, 2004 4:00 am    Post subject: square crop Reply with quote

Hello,

I dont know if this has been said or not, but I am pretty new to these scripts so if I could get some help, I would be much obliged.

I'll give you my scenario:
I am making a photo gallery. I want the cropping script to crop each of my pictures and save them so I can use them as thumbnails.

Here's what I expect:
To encourage my "simplistic" them, I dont want various sizes, so I want all the thumbnails to be a square size. I.E.: I want it to crop 160x160px of the image (starting from the top left), although the output should be the same size as each other (say 100x100px). (i.e. they should be resized smaller)

I was thinking of trying to use both the thumbnail creator and crop canvas together, but dont know how Embarassed

Here's a rough sketch..



Maybe someone could shed some light on the situation.
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Thu Jun 10, 2004 5:07 am    Post subject: Reply with quote

Hi there, and welcome to the board!

I do exactly that for one of my gallery scripts. I do this by using the drop shadow class to resize to a thumbnail and then crop canvas to trim it up to be square. To find out how to do this (and it's really easy), check out this thread:

http://php.amnuts.com/forums/viewtopic.php?t=120

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
guildford
Newbie


Joined: 10 Jun 2004
Posts: 12
Location: Melbourne, Australia

PostPosted: Fri Jun 11, 2004 2:20 am    Post subject: re: Reply with quote

Code:
$cc->cropByPercent(35, 35, ccCENTER);


what do I do if I want (a) crop by pixlels (b) start from the top left corner??

Edit: Never mind, your downloadable examples allowed me to figure it out. Thanks!

Code:
$cc->cropBySize('160', '160', ccTOPLEFT);
Back to top
View user's profile Send private message
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 -> Crop Canvas 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