View Full Version : .psd files and watermark.php
April 5th, 2008, 08:40 PM
I can't seem to fix this problem. When going to showphoto.php for an uploaded .psd file, PhotoPost tries to treat it as an image file, so you just get a blank image there. I have the extension listed in the multimedia types, so I'm not sure why it's doing this. This is only on showphoto.php. On showgallery.php it shows the multimedia thumbnail.
I'm using "on-the-fly image protection", but not watermarking. I even added this code to watermark.php, but it doesn't do anything:
elseif ( stristr($bigimage,".psd") )
BTW, I had to add this code to watermark.php for it to handle .png files correctly:
elseif ( stristr($bigimage,".png") )
$cttype = "Content-Type: image/png";
Any ideas on the .psd problem? Thanks!
April 5th, 2008, 08:42 PM
you cant use psd as an image to my knowledge. You need to add it to the available multimedia types not image types so its treated like a multimedia file
April 5th, 2008, 08:51 PM
Like I said -- the extension IS listed in my multimedia types -- NOT image types. The multimedia thumb shows up fine on showgallery.php -- just not showphoto.php. A blank space with the dimensions of the .psd is there instead of the multimedia thumbnail.
April 5th, 2008, 09:23 PM
I finally got it! In showphoto.php I had to change:
if ( $medsize > 0 )
if ( $medsize > 0 AND ($theext != ".psd") )
around line 643.
It works like it should now. I guess PhotoPost puts something into the $medsize variable when a .psd is uploaded -- and so it treats it like an image because the is_multimedia stuff is later in the code. My modification bypasses that section so that the .psd will be treated as a multimedia file like it's supposed to.
Now I can get some rest! :)
April 6th, 2008, 10:29 AM
Well without knowing more about this I can not say but if you can link a psd image here I can test but I do not beleive what your posting above is quite right. We only process image extentions that are in is_image or multimedia which are in is_multimedia.
April 6th, 2008, 04:07 PM
It's right in my book -- because it works! Maybe ImageMagik tries to process PSDs. I don't know. All I know is that it wasn't working with the stock code, but it works with my mod. I'd love for you to investigate this so that it will work for everyone with your stock code. If you come up with a better solution, I'd be the first to implement it. You can get a download a PSD file just by doing a web search. All I care about for myself and my members is that it's working now and my mod doesn't break anything.
April 6th, 2008, 05:21 PM
i asked for a psd file so I could test. what i am simply saying if you place a psd extention under multimedia files not image files then we should not process anything but treat it as a multimedia file. i know if you try and place psd as an image type you would intentionally break things as its not an image so this is why i asked for a test file to see what i got when trying to process one.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.