[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ApacheGallery] Cannot see tiff images
- To: Tom Brown <[email protected]>
- Subject: Re: [ApacheGallery] Cannot see tiff images
- From: Vlad <[email protected]>
- Date: Sun, 24 Oct 2004 20:57:13 -0400
- Cc: Phil <[email protected]>, [email protected]
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=g52qpwB+Tr8zeOh5evj3gcjifbBzmXvRnit3+XPL4QHI4MJ+INF4ydcggePGhiExMj+quZAyQsu2VOxwqvwj14K/SHnKTc+GqTsXMiaQ65+OQjm2mJGtdWH0MP7HkVSpWqKDe0quFAp2YW9xlOj8me6mF6J59O3sftrJdqt4m9c=
- References: <[email protected]> <[email protected]>
- Reply-to: Vlad <[email protected]>
- Sender: [email protected]
this patch does fix the problem for the preview, however when you
click on an image to view it, A:G sends image with .jpg extension,
however it's a tiff file.
On Sun, 17 Oct 2004 12:54:34 -0500, Tom Brown <[email protected]> wrote:
> [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 the
> > 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.
users mailing list