SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic Image Saving

    I have a page thats sole function is to generate a dynamic image. When the image is loaded on screen, the only code within the source code body is
    HTML Code:
    <img alt="my alt tag" src="http://www.my-site.com/get.php?image_id=1" />
    When i right click on the image and try a "save as.." the suggested file name is *get.php.jpg*. So good so far.

    What i want to do is load this page in the buffer or cache, then rename and save the generated image to a designated folder on my server, instead of displaying it. Once i save the image, i will just header() to another page for display. Is there a way to do what i describe?

  2. #2
    SitePoint Addict Limes102's Avatar
    Join Date
    Sep 2006
    Location
    North Wales
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you can save them as a png file using the imagepng() funcion...

  3. #3
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,397
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    You will have problems as all your images will be called "get.php.jpg".
    Anyway I would say you should be saving your images with the code that is on the http://www.my-site.com/get.php page. How about posting the code you have on that page. Presumably you are using the GD library code ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •