Other Image Formats for Gallery

jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Wed, 2003-06-04 18:30

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

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Thu, 2003-06-05 01:13

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.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-06-05 10:03
 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 17:16

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?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-06-05 17:53

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

 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 17:59

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.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-06-05 18:08

have a look at processNewImage in util.php

 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 18:10

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

 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 18:34

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.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-06-05 18:46
jonmorra wrote:
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.

exec(). You can use the function exec_wrapper from util.php if you prefer.

 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 19:03

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?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Thu, 2003-06-05 19:15

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 :-)

 
jonmorra

Joined: 2003-06-04
Posts: 18
Posted: Thu, 2003-06-05 19:29

Thanks, for your help. Do you know anyone who I could talk to who might be supporting this stuff?