Creating Images in php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jackpod

    #1

    Creating Images in php

    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.

  • Jerry Stuckle

    #2
    Re: Creating Images in php

    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




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

    Comment

    • Alvaro G. Vicario

      #3
      Re: Creating Images in php

      *** jackpod escribió/wrote (25 Aug 2006 10:48:32 -0700):
      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.
      I've been using the ImageMagick suite (available in many Unix boxes) for
      several years and it's very powerful. You have a detailed reference in
      their site:

      ImageMagick is a powerful open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for developers, designers, and researchers.


      If it's installed in your system, you can use its command line tools with
      system() or exec(). Alternatively there's a PECL extension, though it seems
      stalled:



      I haven't used the extension.


      --
      -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
      ++ Mi sitio sobre programación web: http://bits.demogracia.com
      +- Mi web de humor con rayos UVA: http://www.demogracia.com
      --

      Comment

      • jackpod

        #4
        Re: Creating Images in php


        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
        >

        >
        >
        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===
        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.

        Comment

        • Jerry Stuckle

          #5
          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@att global.net
          >>============= =====
          >
          >
          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 imagecoloralloc ate), 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@attgl obal.net
          =============== ===

          Comment

          Working...