Re: Creating Images in php



jackpod wrote:
Jerry Stuckle wrote:

jackpod wrote:

Hi All,
I would appreciate help in developing a strategy for coding the
following requirements:

1) A user inputs his/her first and last name and selects which country
they are from from a drop-down list.
2)This first name, last name and country name are written to a
database.
3)The first name, last name and an image of the selected country's flag
are combined into one image of size x pixels wide by y pixels in
height.

Your help in figuring out a strategy for requirement #3 above would be
much appreciated.



Get a graphical copy of the person's country flag and use the PHP image
functions to superimpose their name on the graphic. See

http://www.php.net/manual/en/ref.image.php


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================


Jerry,

Thanks for the reference. I have an image of each country's flag which
is of size 20 x 10. Being relatively new to php, I am not quite sure
what is the best way to use the GD Library to merge this image with an
image of the person's name. Thanks in advance.


I don't think your image is 20x10 pixels, so I have no idea what it actually is. And not knowing if you need to resize the image or not, the format you have, the format you want it in or any of a dozen other things, it's hard to say.

But the documentation is pretty good. For instance, imagecreate will create an image, imagechar will write a string to the image (it requires a colors created with imagecolorallocate), etc.

The notes have some good examples of what you can do with them.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Guess What I Found??
    ... >>> their service to the country and in their uniform. ... >>flag is an icon and that is all it is. ... >>country nor does it in any way change our ideas and ideals. ... You equate a bit of cloth as somehow being the cornerstone of what the US ...
    (rec.motorcycles)
  • Re: [OT] Why Bush?
    ... > Then other flags were raised quickly throughout the whole country. ... "Project for an American Century" New-World-Order plan, ... flag pole pretending otherwise...Italy was under fascism, ... happened...the bully spoke up and said "he hit me, miss", to which the ...
    (alt.lang.asm)
  • Re: ActiveX.exe more problems
    ... after 1,020 pixels of data. ... flag it starts interrogating the USB device until it sees that the ... As said above - there's absolutely no problem, to signalize from CThread ... to CMain, that the scanline is completed and it ...
    (microsoft.public.vb.general.discussion)
  • Re: (OT) Obama!
    ... HIS HAND ON HIS HEART DURING THE PLEDGE OF ALLEGIANCE, ... Pledging allegiance to ones country isn't really ... but one that is done in respect to the flag. ... So if you disrespect the _symbol_ of the country and its citizens, ...
    (rec.sport.football.college)
  • Re: (OT) Obama!
    ... ON HIS HEART DURING THE PLEDGE OF ALLEGIANCE, ... reciting the pledge was a litmus test for loving our country. ... one that is done in respect to the flag. ...
    (rec.sport.football.college)