[thelist] need help/sample code for php/apache/imagemagick/gd

bruce bedouglas at earthlink.net
Fri Jun 17 09:38:17 CDT 2005


hi...

i'm considering creating a short test app/game to allow users to use their
mouse to select items from a given image/pic. i'd like to be able to take
some basic shapes, and construct an image/mosaic from them. i'd then like to
be able to display the image to the user, and have the user select various
shapes in the image.

i'd also like to be able to determine what 'shape' the user is selecting
within the image via the mouse coordinates...

any ideas as to how this can be quickly developed/thrown together for
testing...

i kind of thought that this should be doable with php/imagemajick/gd as an
apache app..

basically,
-i want to crete a group of test shapes...
circles/squares/rectangles/triangles/etc.. (of different sizes..)
-i'd like to store these
-i'd like to randomly create an image/mosaic of different random shapes with
the shapes in different locations
-i'd like to display this image to the user
-i'd like to have the user select the given shapes within the mosiac/image
via the mouse
-i'd like to get/receive the user's mouse clicks for the given shapes
-i'd like to then take the coordinates of the mouse clicks and see if i can
tell what the user has selected..

kind of emulating what is already done on certain electronic tablets..

as i see the issues, the hard/most difficult part is going to be actually
getting/determining the user's (x,y) mouse coordinates as it relates to the
imagemap/frame. preliminary research indicates that cross-browser solutions
to this issue are difficult to craft. i also need to resolve how to deal
with the user scrolling with regards to the (x,y) coordinates that are
obtained.

if you have any ideas/pointers, or if you know of any apps that already do
this kind of function, let me know.

also, if you have any pointers/thoughts as to how to put this together, i'm
open!!

thanks

-bruce
bedouglas at earthlink.net




More information about the thelist mailing list