Tuesday, July 17, 2012

Create image php


Create image php

Following application create an image according to the input color you submitted.
Enter Red:
Enter Green:
Enter Blue:
<form action="color.php" method="post">
<table bgcolor=#5f5e59 align="center">
<tr bgcolor=#f6f4ef><td>Enter Red:</td><td>
<input type="text" name="red"></td></tr>
<tr bgcolor=#f6f4ef><td>Enter Green:</td><td>
<input type="text" name="green"></td></tr>
<tr bgcolor=#f6f4ef><td>Enter Blue:</td><td>
<input type="text" name="blue"></td></tr>
<tr bgcolor=#f6f4ef><td align="right" colspan=2><input type="submit"value="Get Image"/></td></tr>
</table>
</form>
color.php

<?php
 header ("Content-type: image/png");
 $red=$_POST['red'];
 $green=$_POST['green'];
 $blue=$_POST['blue'];
 $handle = ImageCreate (130, 50) or die ("Cannot Create image");
 $bg_color = ImageColorAllocate ($handle, $red, $green, $blue);
 ImagePng ($handle);
?>

1 comment:

  1. Decide whether you want to hire employees, outsource or do the work yourself. Eventually, you will want to hire employees, but for the time being, you might consider outsourcing your overflow to freelancers, in exchange for a small percentage of their hourly rate. Hire only the best freelancers to complete your overflow assignments, because companies will judge you by how they perform. Thanks.
    Regards,
    Fitness Tips

    ReplyDelete