Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ApacheGallery] Cannot see tiff images



hi,

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 <tdbrown@xxxxxxxx> 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.
> 

-- 
Vlad
_______________________________________________
users mailing list
users@xxxxxxxxxxxxxxxx
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers