[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ApacheGallery] Cannot see tiff images
that seemed to solve one of my problems. The tiffs started to show, but they
were all black (the proportions were correct so it was definitely doing
something). A look in the log mentioned problems with unknown field with tag
and I read somewhere about a problem with Imlib2 giving up when it gets to
unknown tags often created with photoshop, which all my tiffs have been
However before I could look into that I seem to have broken mod_perl
I get "..Apache/Request.pm in @INC..." when I try and reinstall A::G and
when I try to reinstall Apache::Request I get a message saying "make had
returned bad status, install seems impossible" - I think I have mod_perl
1.29 with apache2 which aren't meant to be compatible.
From: Tom Brown [mailto:[email protected]]On Behalf Of Tom Brown
Sent: 17 October 2004 18:55
Cc: [email protected]
Subject: Re: [ApacheGallery] Cannot see tiff images
[resending after subscribing another address to the list. I trying to
work out if mailman looks at the from or return-path address.
Hopefully /this/ time it will work.]
On Fri, Oct 15, 2004 at 10:29:15AM +0100, Phil wrote:
> With my limited knowlege in this area I suspect that this is probably an
> Imlib2 issue rather than an A::G issue, I hope you don't mind me asking
> question here.
This is a good place to ask if you are having trouble with A::G if you
are not sure where the problem might be. So you did the right thing.
The problem is with AG.
Here is a diff relative to the subversion HEAD:
--- Apache/Gallery.pm (revision 280)
+++ Apache/Gallery.pm (working copy)
@@ -127,6 +127,7 @@
my $image_height = $2;
$filename =~ s/\/(\d+)x(\d+)\-//;
+ $filename =~ s/\-((?i)PPM|TIFF?|GIF)\.jpg$/\.$1/;
my ($width, $height, $type) = imgsize($filename);
You can apply this by hand by adding the line marked with '+' (without
the '+') at around line 130 of Gallery.pm .
This problem is caused by the substitution in get_scaled_picture_name.
The fix is not perfect because I think $type is calculated from looking
at the file contents, not the filename extension. The fix above to find the
original filename from the path_info in ($r->uri =~ m/\.cache\//i)
makes some rather tame assumptions about the file name. A better fix
would be to apply the same substitution in get_scaled_picture_name
whatever the value of $type.
> Looks good
> Creating new 'Build' script for 'Image-Imlib2' version '1.03'
> t/simple....NOK 6# Failed test (t/simple.t at line 33)
> # Structures begin differing at:
> # $got-> = '0'
> # $expected-> = '255'
> t/simple....ok 7/7# Looks like you failed 1 tests of 7.
> Test returned status 1 (wstat 256, 0x100)
> DIED. FAILED test 6
> Failed 1/7 tests, 85.71% okay
I'm didn't look into this failed test, but including the output could
have been handy.
28 70 20 71 2C 65 29 61 9C B1 36 3D D4 69 CE 62 4A 22 8B 0E DC 3E
users mailing list