Support for Tiff Image Display Modification Support for Tiff Image Display Modification
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Support for Tiff Image Display Modification

Started by Garibaldi, July 29, 2009, 10:09:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Garibaldi

This thread is for support of the Tiff Image Display Modification. Please post your questions here and I'll do my best to answer them.

Kodak_SLRc

Hello Garibaldi,

Thank you very much for this invaluable code! I have tried to be very careful and follow the mod exactly. However I cannot get a .tif to upload. I had a little trouble getting ImageMagick to work until I found that the trailing "/" was required on the path (/usr/bin/). Then it works fine with .jpg and .png uploads.

With .tif I get:

"Notices
/upload.php
Notice line 2142: Undefined variable: escrow_array
Notice line 2143: Undefined variable: file_failure_array
Notice line 2144: Undefined variable: URI_failure_array
Notice line 2145: Undefined variable: zip_failure_array"

Any ideas?

Thank you in advance,
Tom

Joachim Müller

Turn notices_display off in Coppermine's config if you don't know what they are meant to be used for. Instead, do as suggested per board rules (you agreed to respect them when signing up) and post a link to your gallery for a start.

Kodak_SLRc


Garibaldi

Hi Tom,

Sorry this reply took so long. I tried uploading a tiff to your site and I see the error now is "Forbidden file extension.". Try these steps to resolve this issue:
1. Download and install the "Filetype Editor" plugin from http://coppermine-gallery.net/plugins.php
2. In this plugin, add tiff and tif image filetypes. I've attached a screenshot of what the configuration should look like
3. Try uploading a tiff again and let me know what happens

Kodak_SLRc

Hello Garibaldi,
Thank you very much for looking at this.
- I installed the filetypes editor. The types were there but set as document; I changed them to image.
- Tried a .tif upload and got "0 uploads were successful."
- I confirmed that "Max size for uploaded files (KB)" was big enough (30,720).
- I confirmed that "Max width or height for uploaded pictures/videos (pixels)" was big enough (5120).

Struggling for ideas, I decided to make a little .tif, just 150 KB or so. Voila, it uploaded. The tiff_download directory was created and the .tif file was in it with a gobbledygook file name, f7c3a521.tif. I made another version of it with LZW compression and that worked too. (Although, I don't see how a user can get to the .tif to download it through the CPG interface.)

Tried all this again with incrementally larger file sizes. Only used LZWs. The cutoff is is somewhere between 1.4 MB and 2.5 MB.

So now, two issues remain:
1) How to set the file size limit up to around 30 MB, and
2) How does the user access the actual .tif file for download?

Thank you very much in advance,
Tom

http://www.thomasrobertfrederick.com/pal/images_test/
Username: guest
Password: guest

Garibaldi

Hi Tom,

Ah, I believe I know what your problem is. You need to edit your PHP settings to allow for larger filesize uploads (it's probably at 2MB atm). Locate your php.ini file and search for the upload section. I believe the line you're looking for is "max_upload_size" or something like that

Kodak_SLRc

Hello Garibaldi,

Yes, that did it. I set upload_max_filesize = 32M, it was 2. Also while I was nosing around in there I set memory_limit = 128M, guessing this would give ImageMagick more room to work. Also got a warning about register_globals being on, so I turned it off.

Still had some troubles, though. Had problems uploading more than one at a time, so I just uploaded one at a time. Everything seemed good. I decided to clean up by deleting the album created by guest.

Then I noticed (though it may have been there before I deleted guest's album)... Somehow, when one clicks on the TIFFs album, all 18 images are listed. (There should be 9 images in JPEGs and 9 images in TIFFs). Doggoneit! Ran "update database" in Admin Tools but that didn't help or indicate any problems. Then, just fiddling around, clicked on Home, then Edit Files (of the TIFF album), edited some keywords and applied modifications, and POOF! The TIFF album shows just the 9 images that it should, with the handy link to the actual .tif file! The JPEG album works correctly also.

So at the moment, all is working perfectly! Hope this posting helps others. Thank you very much for your assistance and for this invaluable mod. Very much appreciated!

Best,
Tom

Joachim Müller

Quote from: Kodak_SLRc on November 06, 2009, 12:21:53 AMI set memory_limit = 128M, guessing this would give ImageMagick more room to work.
Afaik ImageMagick is not affected by the limitations imposed on PHP by php.ini. The limitations only apply when using GD, because that is compiled in into PHP, while ImageMagick is an external executable that PHP sends data to to process.