View previous topic :: View next topic |
Author |
Message |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Thu Mar 11, 2004 10:05 am Post subject: Help!!!!! |
|
|
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 |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Thu Mar 11, 2004 10:15 am Post subject: |
|
|
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:
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 |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Fri Mar 12, 2004 3:32 am Post subject: |
|
|
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 |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Tue Mar 16, 2004 7:28 am Post subject: |
|
|
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 |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Wed Mar 17, 2004 4:40 am Post subject: |
|
|
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 |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Fri Mar 26, 2004 7:01 am Post subject: ok and now? |
|
|
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 |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Fri Mar 26, 2004 9:37 am Post subject: |
|
|
Oop been an idiot. I forget to check the rest of your page and i found the extended classes.
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 |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Fri Mar 26, 2004 10:22 am Post subject: |
|
|
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 |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Mon Mar 29, 2004 3:33 am Post subject: |
|
|
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.
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.
Cheers,
Andy |
|
Back to top |
|
 |
Flying dutchman Newbie
Joined: 11 Mar 2004 Posts: 9
|
Posted: Tue Mar 30, 2004 7:55 am Post subject: |
|
|
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 |
|
 |
|