PDA

View Full Version : Geek thread: photos, php to jpg



Local
06-03-2006, 08:02
The large photos on the whiteblaze galleries are in the .php format. I'm putting Trail Days galleries on http://www.traildays.info/photos.html and somehow forgot how to convert the .php file to a .jpg. Photoshop Elements won't do it, or I can't figure it out if that would work. Is there a simple way to make this conversion? Whiteblaze is linked on the Trail Days site and I want to link it to the other two sites below, maybe using some photos from the galleries.

www.traildays.info (http://www.traildays.info)
www.damascus.org (http://www.damascus.org)
www.vacreepertrail.us (http://www.vacreepertrail.us)

Dances with Mice
06-03-2006, 08:39
In my gallery, when I rightclick on a gallery photo and choose "Save As", my photos are listed as bitmaps (.bmp). Photoshop can convert that to other formats.

Local
06-03-2006, 08:49
Man, you've got some beautiful photos on your galleries. I think my favorite is "On Hawk Nest." Great stuff. And your photos do save as .bmp (bitmap) files for some reason. I can convert those in photoshop. It's the php files I have trouble with. I converted one by PackMule to a .jpg but forgot how I did it.

Dances with Mice
06-03-2006, 10:02
Oh, I assumed photos in my gallery were the same as everyone elses.

Link an example of a photo you're having problems with.

Ratbert
06-03-2006, 10:26
Your Photoshop Elements program should have an option under "File" called "Save for Web."

This will allow you to save as a .JPG and it will convert to 72 dpi and let you choose the quality level and size. I don't have any PHP images to try, but it works with TIF and PSD files.

Local
06-03-2006, 10:51
Ratbert, yes, Photoshop has the "save for web" option, but the problem is that it won't recognize or open a .php file. Check on PackMule's photo gallery:

http://whiteblaze.net/forum/vbg/browseimages.php?do=member&imageuser=9060

When his photos open in a larger format they are .php. (I think his latest photos are going into R rated territory.) :) When I save one and try to open it with various programs, it won't open. There's got to be a way to do this because I did it before then forgot how.

Dances with Mice, I don't know why some of the photos open as bmp and others as php. Only the wise and all-knowing administrators of whiteblaze.net can explain this mystery.

Local
06-03-2006, 11:09
Geez, this is embarrassing. I just right-clicked a large php image in PackMule's gallery and typed in the .jpg extension and it saved as a jpg file. Tengo nada en la cabeza. Estupido. I am stupid and have nothing in my head.

http://www.traildays.info/images/packmule2.jpg

Geez. I'm going kayaking. Gracias, amigos.

Amigi'sLastStand
06-03-2006, 11:41
Geez, this is embarrassing. I just right-clicked a large php image in PackMule's gallery and typed in the .jpg extension and it saved as a jpg file. Tengo nada en la cabeza. Estupido. I am stupid and have nothing in my head.

http://www.traildays.info/images/packmule2.jpg

Geez. I'm going kayaking. Gracias, amigos.
Did you try to view it afterwards?

Dave568
06-04-2006, 21:07
.php files are not image files. PHP is a scripting language that is used to write interactive web applications. The PHP files you are seeing are the files that someone has programmed to display the image files, which are themselves either jpegs, bitmaps, gifs, or something of that sort.

Local
06-04-2006, 22:10
Amigi, yes, the .jpg image is here:

http://www.traildays.info/images/packmule2.jpg

Dave568, I don't understand how the scripting language works, but I understand the concept, or I think I do. When I try to save the image displayed in php, I'm actually trying to save the php script instead of the image unless I rename the image with a graphic extension such a .jpg or .gif, etc. Whether this is right or not, at least through your explanation I will know when I see a php file that it is a scripting language and not designating the displayed image.

http://www.traildays.info/photos.html - setting up this page is where I ran into this problem and now it is not a problem. Thanks very much.

Ratbert
06-04-2006, 22:49
Thanks for the info...for the life of me I couldn't figure out what a PHP extension file was, as I had never heard of one. I'm completely ignorant when it comes to web applications and such things.

Uncle Silly
06-04-2006, 23:59
The PHP scripts are what generates the webpage you see -- PHP on the server generates HTML to send your browser, and your browser displays the HTML. If your "Save As" is trying to save a PHP file, you're probably clicking on "Save Link As" instead of "Save Image As". Oh, nope, my browser's offering to save that as a PHP file too... oh well. Just rename it as a JPG file and try opening it in Photoshop or whatever -- if that doesn't work, try GIF, PNG, and BMP (in order of most-likely-suspects).

What's happening is that the browser is confused as to the data type. It's getting the right data (JPG image data, in all probability), but there's a bug in the server script or browser that makes the browser suggest that it's PHP. So no, Local, you're probably not saving the PHP script.

Two things to look at here: (1) file size, and (2) data. Once you've downloaded it, look at the file size. If it's small, 1kb or so, it's probably the script, and you should be able to read it in Notepad. If it's larger than 20kb or so, it's probably image data and you can open it in Photoshop. Just rename the extension to see if it's a different data type -- ie, rename it to a .JPG extension to see if it's a JPG, and if it isn't, Photoshop will give you some error about corrupt data.