![]() |
|
Troubles with TIFF (Imagick) - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Troubles with TIFF (Imagick) (/thread-10385.html) |
Troubles with TIFF (Imagick) - ikar - 2012-09-08 I'm having some trouble with TIF/TIFF's, and am wondering if anyone has had similar issues and addressed them, or if others are having no issue at all with such files and hopefully how your setup differs from mine. My basic setup is: TIF/TIFF files and thumbnails appear to work with other programs, such as 'digikam' and 'image viewer'. However, when I place a TIF/TIFF in a Zenphoto directory and attempt to view, issues begin. First, Zenphoto does not recognize any file with only a TIF extension (perhaps this is related to imagick?). Renaming to a TIFF extension leads to Zenphoto recognizing the file and even pulling metadata from it, a workaround I could certainly live with - but that brings me to the second issue, which is not generating a usable/used thumbnail. By that I mean in album view I see only the filename or caption text as a link, instead of a thumbnail -- there's not even a placeholder box, just text, which is very jumbled if it's trying to show a long caption. But upon looking in the relevant cache folder, there is in fact a generated file -- _100_w100_h100_thumb.tiff. Sometimes that file can be opened (directly from the cache folder) and appears to be a perfectly good thumb sized image of the original, but sometimes that file appears to be black or blank ('image viewer' properties show it to be a 100x100 image, but otherwise the image appears to view as just a black box). In either case, it is not shown as a thumb in Zenphoto, just the text link. Clicking on the text opens the image viewing page, however with class-WEBdocs/TIFF disabled there is no image, just the filename or caption as a link to the full image. Clicking on the full image link will load the full image. I've used TIFF's from a few different sources, although not in much volume. All of them have been around 12MB or less, so not huge files, but I'd really rather not have to add another step by converting the ones I have -- especially when this seems so close to working. The ones with black box thumbnails only seem to all have been generated by Silverfast (scanning software), and I might blame that except those same images work fine in other programs. The generated thumbs from other TIFF's I can view in something like 'image viewer', but still aren't being shown in Zenphoto for some reason. So that's a long way of saying, does anyone have an idea why this isn't working or what I might try to address it? Thanks! Troubles with TIFF (Imagick) - acrylian - 2012-09-08 I just tried on my live test site as well with Imagick and tiffs also don'T work. I get an php error: Quote: Backtrace: USER NOTICE: Method Not Allowed in **/zenphoto/zp-core/functions-image.php on line 33 I will add the keyword "imagick" to this topic so our colleague who helped out with this lib will possibly spot it. Troubles with TIFF (Imagick) - ikar - 2012-09-08 Thanks. At least now I know I'm not crazy! Troubles with TIFF (Imagick) - kagutsuchi - 2012-09-08 The Imagick lib will use any formats that are available to it from ImageMagick. If The problem with the TIFF format is that there are so many variations of it that it becomes difficult to tell whether a given image will work or not. If these images are all coming from Silverfast, then I would guess that these images are somehow invalid to ImageMagick. For one of the images that fails, would you post the output of this command:
You might also try to Troubles with TIFF (Imagick) - ikar - 2012-09-09 Attempting 'identify' on either the TIF or TIFF extension provides what appears to be identical output, although I haven't done a character by character comparison. Identify verbose of a Silverfast file, with basic redactions: Image: (redacted).tiff Format: TIFF (Tagged Image File Format) Class: DirectClass Geometry: 2442x1650+0+0 Units: PixelsPerInch Type: TrueColor Base type: TrueColor Endianess: MSB Colorspace: RGB Depth: 8-bit Channel depth:
Channel statistics:
Image statistics:
Rendering intent: Undefined Interlace: None Background color: white Border color: rgb(223,223,223) Matte color: grey74 Transparent color: black Compose: Over Page geometry: 2442x1650-9223372036854775808-9223372036854775808 Origin geometry: -9223372036854775808-9223372036854775808 Dispose: Undefined Iterations: 0 Compression: None Orientation: TopLeft Properties:
Profiles:
Artifacts:
Tainted: False Filesize: 12.1MBB Number pixels: 4.029MB Pixels per second: 134.3MB User time: 0.010u Elapsed time: 0:01.030 Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org identify: (redcted).tiff: unknown field with tag 11 (0xb) encountered. 'TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706. ` Image: (redacted).tiff Format: TIFF (Tagged Image File Format) Class: DirectClass Geometry: 1392x994+0+0 Resolution: 72x72 Print size: 19.3333x13.8056 Units: PixelsPerInch Type: TrueColor Base type: TrueColor Endianess: MSB Colorspace: RGB Depth: 8-bit Channel depth:
Channel statistics:
Image statistics:
Rendering intent: Undefined Interlace: None Background color: white Border color: rgb(223,223,223) Matte color: grey74 Transparent color: black Compose: Over Page geometry: 1392x994+0+0 Dispose: Undefined Iterations: 0 Compression: None Orientation: TopLeft Properties:
Profiles:
Artifacts:
Tainted: False Filesize: 8.149MBB Number pixels: 1.384MB Pixels per second: 46.12MB User time: 0.030u Elapsed time: 0:01.030 Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org identify: (redacted).tiff: unknown field with tag 37724 (0x935c) encountered. 'TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.' ` When I attempt 'convert' with these 2 files, I get: convert: (redacted).tiff: unknown field with tag 11 (0xb) encountered.'TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706.
convert: (redacted).tif: unknown field with tag 37724 (0x935c) encountered. 'TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/706. ` ...respectively matching the unknown field tags from 'identify -verbose' listed above. Conversion still DOES complete. However! If I convert the .tiff to a .jpg the resulting image is recognized and displayed by Zenphoto. If I 'convert' that .jpg back to a .tiff, the 'identify' warning goes away but Zenphoto still does not show an icon, just a text-link to the image view page -- the same issue I described originally. On a whim I also converted a working .jpg into a .tiff, with the same results. In each case a thumb is generated in the cache folder, which I can view with 'image viewer' and which appears essentially normal (colors are a bit off, but fine for a thumbnail), with the exception of Silverfast generated tiffs where a black (this became apparent when I changed the background color of the viewer from black to white - maybe a layering issue, unrelated to Zenphoto) but appropriately sized thumb is generated. But no TIFF from any source I have tried has been visible except as a text hyperlink in Zenphoto. Since using 'convert' to generate the .tiff doesn't lead to it working, I'm at a loss. (Sorry about formatting, it didn't come out cleanly and every edit I seemed to be conflicting with whatever this forum software was doing to the post. I'll re-post from scratch if it is unreadable/on request.) Troubles with TIFF (Imagick) - kagutsuchi - 2012-09-09 It seems to me that there are really two issues:
In general, it's usually advised against using TIFF files directly on the web and instead to convert them beforehand to a more generic format. It seems to me that this will be the best option since the TIFF format seems quite complex and varied. Troubles with TIFF (Imagick) - ikar - 2012-09-10 Well, I can view these TIFF's with Firefox, including the 'full image' from Zenphoto, once downloaded, and the cached thumbs & downsized versions if I choose to open them directly with Firefox. But this appears to be a benefit of the mozplugger plugin. The thumbnails just don't show up in album view in Zenphoto, and the downsized versions, while generated in cache, don't show up in the image view. So for #1 I agree, and that seems to be a separate issue. But for #2 it seems to be a matter of how Zenphoto is trying to present TIFF's to the browser -- at least, probably not an issue with imagick/imagemagick. That said, it may be a low yield find-and-fix issue, and personally I don't know where to look (theme files, or somewhere else?). I do agree with the general concept of avoiding TIFF files on the web, but on the other hand the ideal end user solution is one which absorbs what it is given and is able to manage and display it. TIFF is still a fairly common format, though somewhat niche, and being able to make them viewable and available, with minimum setup effort, would be ideal. It does seem so so close, as the files are there and otherwise viewable (although black from Silverfast). As it turns out I have some collections which I don't want to make available by way of Zenphoto, as well as a number of videos which are obviously impractical to make available in native formats, so the inconvenience of separately storing original TIFF's along with original videos and making some jpg's available with Zenphoto would be somewhat mitigated. Unless/until I or someone can figure an alternative, I may either do that or activate one of the plugins to allow a placeholder thumbnail and warn my limited viewers -- maybe both, with a viewable jpg alongside. Kludgy though. I don't know how most other similar applications handle this but one I used previously (Synology PhotoStation), while frustrating enough in other ways to move to an alternative solution, would perform format conversions for display/streaming while maintaining the original file. Starting to run into a tangent with that, perhaps. Thanks for the input! Troubles with TIFF (Imagick) - kagutsuchi - 2012-09-10 Ahh, I think I understand what's going on. When viewing an image independently, the browser uses whatever works best, which would be mozplugger. In a Zenphoto page, however, every image is displayed using an To accomplish this, it should be possible to create a new plugin Troubles with TIFF (Imagick) - ikar - 2012-09-10 Well, I just stumbled on another still very kludgy option. So I went and added 'TIFF' as an extension using class-AnyFile. This evidently allowed Zenphoto to use an identically named jpg in the same directory for thumbnail purposes (leftover from testing earlier), although when you mouse hover over the image the link claims it's a TIFF. I don't think it really is. I think this is the same functionality available for video thumbnails in Zenphoto. Unfortunately, though I only just stumbled on it and haven't toyed with it yet, in the image view it shows as still thumbnail sized -- but clicking on the full image gets you the TIFF. ... After a few minutes of playing with naming in the cache folder, I could "fool" Zenphoto into using a larger jpg image as a thumbnail. Zenphoto automatically squeezed it into a thumbnail sized space in album view, but showed the larger jpg image in image view (rather than just a thumbnail), then if that image was clicked it took me to the full sized TIFF download. For album view thumbnail purposes it might be a useful way to thumbnail a link to the full sized TIFF so one has an idea what they're getting before they get it, but it isn't a solution as it (I think) is really just showing the jpg anyway, and doesn't display a normal image view page (so one can't see an intermediate sized version, at least not without a painstaking and wholly impractical process of manually moving/renaming files into the cache folder). Troubles with TIFF (Imagick) - acrylian - 2012-09-10 What you describe is indeed the video thumb functionality and if you need to deliver tiff fine data that would be a good way to workaround this. Just to note is working on my test site: I don't have Silverfast but couldn't it be something that it generates? Wrong meta data or else? Btw, TIFF is by no means a niche format! It is actually widely used in the print area because of the lossless compression abilities. Troubles with TIFF (Imagick) - kagutsuchi - 2012-09-10 As acrylian noted above, that functionality is the same as the video thumb functionality. QuickTime definitely will allow for TIFF viewing, so any application compiled against it should work, which would mean that OSX browsers should work. To get it working in all browsers, you'll want to do more than to add the TIFF extension. You should be able to use Troubles with TIFF (Imagick) - ikar - 2012-09-10 Didn't see your post last night until I finished mine, then couldn't log back in to reply. A Thanks again! Troubles with TIFF (Imagick) - acrylian - 2012-09-10 Prototypes are the class-***** plugins you already modified one. All those are extensions for formats graphic libaries don't support directly. With those you can make Zenphoto "catalog" any kind of file if needed. Of course for specific thumbs you always will need to follow the video thumb way. Troubles with TIFF (Imagick) - ikar - 2012-09-10 There are definitely differences in display among current browsers, now that I'm testing with different ones. Chrome shows placeholder boxes instead of the text links Firefox was giving. Internet Explorer successfully displays TIFF thumbnails in album view, and an almost normal image view page, although a little imperfect (using 695px or 795px resizes sometimes causes those images to fail and a placeholder box shown on the image view page) -- however, I had previously installed AlternaTIFF ActiveX plugin. I started to test with Safari but seem to have broken something on my site which I'll have to fix later -- or maybe too many failed logins from Safari, heh. Anyway, it's helping to get a better understanding of this. Troubles with TIFF (Imagick) - asdl - 2012-09-13 I can't really help with the development questions, but I can chime in on the importance of supporting TIFFS - I've just created a ZenPhoto website to collect and display historic photographs for a small community in Maine, and very much want people to contribute their photo scans as TIFFs - it's a great archival format that can be reprinted, resized, reused without any quality loss from compression and recompression. I think the ZenPhoto TIFF web display should still be JPEG, which ImageMagik can happily do - it's how the ResourceSpace photo management system does it: you upload a TIFF, ResourceSpace saves the TIFF and spits out several different sizes of JPEG, then displays the small size JPEG and offers all the others for download. My users are definitely aware of TIFFs - my first batch of photos was four CDs of scanned photos, saved as TIFFs, which I had convert to JPEGs to upload for the previous version of ZenPhoto. You can check out the website in question at: bpoolphotos.com I've been considering adding a ResourceSpace subdomain to allow users to upload TIFFs - which we really need if we're going to be an actual photo archive! - but if I could handle it all within ZP it would be so great! Much better community building with comments, ZenPages, and great galleries. Troubles with TIFF (Imagick) - kagutsuchi - 2012-09-14 I've made http://www.zenphoto.org/trac/ticket/2244 for creating such a plugin. Troubles with TIFF (Imagick) - ikar - 2012-09-15 Awesome. Saw this upon checking in before going to create a ticket myself, so I'm glad to see it has a little traction at least. I've had woefully little time to learn, experiment, learn some more, etc., and have had essentially zero success on my own. I hacked a few existing plugins just to try proof of concept in using ``, with no success (though extremely limited knowledge as far as what I was doing). But it sounds like a thought on why that wasn't working may have already come up on the ticket. If I come up with anything concise that might be specifically useful I'll post it there. |