The follow code enables users to select colors by clicking on an image:
[CODE=php]
<? php
$im = imagecreatefrom jpeg("ColorWhee l.jpg");
$x = $img1_x;
$y = $img1_y;
$clr1 = dechex(ImageCol orAt($im, $x, $y));
php ?>
<html>
<form action = "pig.php">
<input type="image" name="img1" height="350" width="350" src="ColorWheel .jpg"></p>
</form>
</html>
[/CODE]
Although it works, it is rather cumbersome in that the page must refresh to retrieve the selected color. Is there a way to replicate the "ImageColor At" command using Java - perhaps initiated by a mouseover?
Any help/advice would be greatly appreciated - I have been trying to find a solution for a very long time. Thank you very much in advance
[CODE=php]
<? php
$im = imagecreatefrom jpeg("ColorWhee l.jpg");
$x = $img1_x;
$y = $img1_y;
$clr1 = dechex(ImageCol orAt($im, $x, $y));
php ?>
<html>
<form action = "pig.php">
<input type="image" name="img1" height="350" width="350" src="ColorWheel .jpg"></p>
</form>
</html>
[/CODE]
Although it works, it is rather cumbersome in that the page must refresh to retrieve the selected color. Is there a way to replicate the "ImageColor At" command using Java - perhaps initiated by a mouseover?
Any help/advice would be greatly appreciated - I have been trying to find a solution for a very long time. Thank you very much in advance
Comment