I'm working in the Center for Imaging Science at Johns Hopkins University, and I am looking to use Gallery to store different images that we have on file. These images are all in different formats (i.e. .ps, .eps, .tif, .gif, etc.) and after familiarizing myself with Gallery I noticed that the most of the file types that I have are not supported by Gallery. I was wondering if you have a way to allow Gallery to include these types of files. If so, please let me know where I can get such an update, and if not what steps I have to take in order to create an update.
Thanks,
Jon
PS. I'm using Gallery vs. 1.3.4
Posts: 487
You'll want to be using ImageMagick since that will make life easier for you. Then any code you will need to update should be in the file 'util.php'.
A few particular functions include:
* acceptableImageList
* valid_image
That may be it. If you use NetPbm, you'll have to modify the the two
Pbm functions to call to correct binaries for the differing image formats.
Posts: 3473
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=6447&highlight=tif%2A+eps
Posts: 18
Thanks, for the help. I tried the link that Joan sent me and I was able to upload the tif images. When I uploaded the image, it didn't appear. It was only a blank box. Is there a way to fix this? Also, I looked at the info for the getimagesize function, and it doesn't support ps, or eps. Is there another way to get it to work for those files?
Posts: 3473
Not all browsers can display TIF. You could try upgrading to the latest version, or trying a different browser.
As for EPS, and PS: I doubt any browser will display them. You could do a bit of a rework to see if you can convert them to jpg on upload, or you could just have them in a non-viewable, downloadable version using http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4914&highlight=types
Posts: 18
I think I'll do that. Just one more question, where in the code does it check for the file type of the submitted picture. I was going to add a script of my own there the convert the file to .gif so that it would be viewable in the brower. Then I was also going to add the original as a downloadable file using the link you sent me.
Posts: 3473
have a look at processNewImage in util.php
Posts: 18
I just looked tried to run the other.patch file. And I got a lot of messages saying "hunk failed". Is this ok? Also, when I try to upload a .tif file now I get three warning messages
Warning: Unable to open '' for reading: No such file or directory in /cis/home/jonmorra/public_html/gallery/platform/fs_unix.php on line 24
Warning: getimagesize: Unable to open '/cis/home/jonmorra/public_html/albums/jonmorra/760649001_auto_surf.thumb.jpg' for reading. in /cis/home/jonmorra/public_html/gallery/util.php on line 196
Warning: getimagesize: Unable to open '/cis/home/jonmorra/public_html/albums/jonmorra/760649001_auto_surf.thumb.jpg' for reading. in /cis/home/jonmorra/public_html/gallery/util.php on line 196
could you help me out some more? Thanks
Posts: 18
Sorry to keep bothering you, but I just have one more question. What command do I use to call outside scripts? I tried using system but the program yelled at me.
Posts: 3473
exec(). You can use the function exec_wrapper from util.php if you prefer.
Posts: 18
Also, do I even have to write an outside script, or will ImageMagick, automatically convert the files for me? Is this already in Gallery or the others.patch? If not, where is the best place to put it?
Posts: 3473
this may get you started
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4735&highlight=abandoned
Note the "I'm not supporting this" stuff
Posts: 18
Thanks, for your help. Do you know anyone who I could talk to who might be supporting this stuff?