Jump to content


Photo

how to change the file name created using the GD lib


  • Please log in to reply
3 replies to this topic

#1 Nomax5

Nomax5
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts
  • LocationYork England

Posted 23 August 2006 - 01:14 PM

I want people to be able to right click images I make with php and “Save As…”

if I create a jpeg within test.php with imagejpeg(“$im);  which outputs it to the browser.
when I right click the image its called  “test.php” how do I make it called “something.jpg” instead?

I’m thinking my visitors will save it with the .php extension and get confused.
I don’t want to save it as a file if I can help it because there will be many of them.

Any ideas?


#2 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 23 August 2006 - 02:52 PM

the image would be a .jpg

For example
test.php, right click, save as
test.php.jpg

Now how to remove the .php. is a good question
Tell me the problem, I will try tell you the solution

#3 Nomax5

Nomax5
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts
  • LocationYork England

Posted 23 August 2006 - 04:13 PM

when you do "Save As..."  its just called "test" 
and you can choose type "GIF (*.gif)"  or BMP



#4 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 23 August 2006 - 05:30 PM

well, that depends if u have file extensions on or not
Tell me the problem, I will try tell you the solution




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users