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.


Help!!!!!

 
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
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Thu Mar 11, 2004 10:05 am    Post subject: Help!!!!! Reply with quote

HI first off all i love crop function second off all im a absolute newbie. I know javascript and that's it. Im wondering what GD is. Is it a program or something that you need to use the crop function. Second do you need to use the classes that you made to run your function. Im making a CMS for my site and thought it would be handy if you could crop pictures save them to your database and display them on your site.

Any suggestions

Thanx
Back to top
View user's profile Send private message Send e-mail MSN Messenger
amnuts
Site Admin


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

PostPosted: Thu Mar 11, 2004 10:15 am    Post subject: Reply with quote

Hi, Flying Dutchman, and welcome to the board!

As you're here, I'm guessing you have an understanding of what PHP is. Well, GD is a graphics library that can be interfaced with very easily through PHP. New versions of PHP (from 4.3.0) have the GD library already packaged with the source distribution. If you are running PHP on a windows platform and just downloaded the installation version of PHP, then the GD library comes pre-compiled and ready to use.

You can check whether or not you have GD installed (along with anything else that PHP has compiled in) by using the phpinfo function. Just create a file with this line in it:

PHP:
<?php phpinfo(); ?>


and view it in your web browser. (call the file 'info.php', or something.)

So what do you need to make the class run? PHP, the GD library and a web server that understands and correctly handles PHP files. If you want to use the crop-interface class, then you will need to download the class.cropcanvas.php and class.cropinterface.php classes, as well as the drag/drop javascript and semi-transparent background image.

If you are building a CMS, you might want to look into using the class.dropshadow.php file, which is a fairly powerful image resizing class (which can also apply a 'drop shadow' effect onto the thumbnail).

Hope that helps!

Andy


Last edited by amnuts on Tue Mar 16, 2004 7:29 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Fri Mar 12, 2004 3:32 am    Post subject: Reply with quote

Thanx andy that will get me started. I have downloaded GD because my server uses and older version of PHP. When i run in to some problems i'll let you know.

Thanx again greetings from amsterdam
Back to top
View user's profile Send private message Send e-mail MSN Messenger
amnuts
Site Admin


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

PostPosted: Tue Mar 16, 2004 7:28 am    Post subject: Reply with quote

Flying dutchman wrote:
Thanx again greetings from amsterdam


Cool! My wife and I will be in Amsterdam for a couple nights this weekend! Any recommendations on what to see and where to eat?

I moved the GD question to the general php questions board, as it seemed to fit in there better.

Cheers,

Andy


Last edited by amnuts on Wed Mar 17, 2004 5:15 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Wed Mar 17, 2004 4:40 am    Post subject: Reply with quote

HI andy

Well i'll give you some tips were to go in amsterdam

-The palace on the dam(paleis op de dam<in dutch>)
-Rembrandts square(english pubs can be found there)
-The shopping centre(can't miss it)
-The red light district(Its funny to see)
-De nieuwe kerk(new church)
-De oude kerk(old church)
-Van gogh museum
-Het rijksmuseum(museum of the state)
-Stedelijk museum(city museum)
-A canal cruise
-Histrorical brewery brouwerij t'?j
-Le hollandais Amsteldijk 41
1074 HV AMSTERDAM
T: 020 6791248
-What kind off food do you like. The restaurant above has a french, dutch and belgian kitchen

If you wanna know more you can email me on mennohegeman@hotmail.com

greetz the flying dutchman
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Fri Mar 26, 2004 7:01 am    Post subject: ok and now? Reply with quote

Hi andy. First off all how was your trip to amsterdam?

Second i finally got round to implement your class. I doesn't give any erros. But i have a few questions. First one i iniately downloaded ur class from php classes.org. In the beginning of the script it said include class.cropcancas.php Then i downloaded ur class and after examinig the scripts i came to the conclusion that they are almost indentical. It probaly think its an older version.

Second in the demo of your class i see radiobuttons and such. I think i probaly have to echo them in php in javascript. Am i right. If so how do you go about on that. I now how to echo buttons and such, but how will make the connection with the functions


Third any hints in how i can include a resizing script in your class. Something that will decrease the size of the picture with 50%.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Fri Mar 26, 2004 9:37 am    Post subject: Reply with quote

Oop been an idiot. I forget to check the rest of your page and i found the extended classes. Shocked

As to my other question about the resizing i found that one out on one of other classes. I guess your worthy of the title php guru.

As for my other question i kind off figured out of how to get the images that are stored on my website. But any hints how to approach those files the best way possible are welcome. When u save an image is it possible to save that image with the same name?

well thanx
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Flying dutchman
Newbie


Joined: 11 Mar 2004
Posts: 9

PostPosted: Fri Mar 26, 2004 10:22 am    Post subject: Reply with quote

Ok maybe i'm a little in the dark right now. Do you need to use the walter zorn script. You only use that one for the interactive drag and drop croping tool right?

So which classes do you actually need to use gor the other 1????

Please help me out?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
amnuts
Site Admin


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

PostPosted: Mon Mar 29, 2004 3:33 am    Post subject: Reply with quote

Hi there,

First off; I had a wonderful time in Amsterdam, thanks! I'm looking forward to going back there sometime to investigate more. It rained all the time, but that's okay... I'm used to the BRitish weather, so a little downpour never hurt. Wink

Flying dutchman wrote:
Ok maybe i'm a little in the dark right now. Do you need to use the walter zorn script. You only use that one for the interactive drag and drop croping tool right?

So which classes do you actually need to use gor the other 1????


The class.cropcanvas.php class is the main cropping class. You need this one no matter how you want to do your cropping. If you want the cropping interface then you'll need to have the class.cropinterface.php class, the wz_dragdrop.js javascript (from Walter Zorn), and the transbg.png image (that 'shades' the cropping area). The interface class extends the main class and includes the javascript.

Check out the test.* files to see how to use the standard cropping methods (ie, programatically cropping) and the interface (interactive cropping through drag/resize).

I think you answered the rest of your own questions. Smile

Cheers,

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


Joined: 11 Mar 2004
Posts: 9

PostPosted: Tue Mar 30, 2004 7:55 am    Post subject: Reply with quote

Nice to hear u had a nice time in Amsterdam. Well i followed the instructions. The code doens't give a error. Now i have the problem. Namely the following. The interface i probally have to echo in php cause i made it in javascript. I used your dropshadow class aswell and i did the same there. But how do you tell the javascript part how to use the functions.


greetz menno
Back to top
View user's profile Send private message Send e-mail 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 -> 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