Hi,
I'm working on creating a dhtml front end for an online image processor. I want my clients to be able to upload an image (i'm using PHP for this), and then be able to crop the image (the image will be displayed on the web page after uploaded) using a photoshop-like selection tool (created with dthml). The values generated from the tool will be sent back to the server to process the image using PHP and ImageMagick.
Does anyone have any hints about how to get started with the javascript part (only needs to work for IE). I'm not too familiar with drawing with dthml (are there any built in functions yet). I read somewhere that you have to use a separate layer for each pixel drawn (or something to that effect). Are there any good third party or free dthml api s for this?
I just need for the user to see the selection they have drawn out (and I will display the width and height of the selection so they will know where to stop). So I need to do things like onMouseDown="MouseDown=true;x_start= getX();y_start=getY();" onMouseMove="if(MouseDown==true){showRectangle();}" onMouseUp="MouseDown=false;"
// this is not meant to be real code, just an idea of what I'm trying to do, and then I'd create a showRectangle function using dhtml, such as lineTo type functions.
Thank you for any thoughts.
Jeff
I'm working on creating a dhtml front end for an online image processor. I want my clients to be able to upload an image (i'm using PHP for this), and then be able to crop the image (the image will be displayed on the web page after uploaded) using a photoshop-like selection tool (created with dthml). The values generated from the tool will be sent back to the server to process the image using PHP and ImageMagick.
Does anyone have any hints about how to get started with the javascript part (only needs to work for IE). I'm not too familiar with drawing with dthml (are there any built in functions yet). I read somewhere that you have to use a separate layer for each pixel drawn (or something to that effect). Are there any good third party or free dthml api s for this?
I just need for the user to see the selection they have drawn out (and I will display the width and height of the selection so they will know where to stop). So I need to do things like onMouseDown="MouseDown=true;x_start= getX();y_start=getY();" onMouseMove="if(MouseDown==true){showRectangle();}" onMouseUp="MouseDown=false;"
// this is not meant to be real code, just an idea of what I'm trying to do, and then I'd create a showRectangle function using dhtml, such as lineTo type functions.
Thank you for any thoughts.
Jeff