Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Creating thumbnail solution help

by uG (Scribe)
on Mar 06, 2010 at 01:16 UTC ( #827088=note: print w/ replies, xml ) Need Help??

in reply to Re: Creating thumbnail solution help
in thread Creating thumbnail solution help

Here is an image: The code im using is

sub thumbnail :Regex('^thumbnail/(.+)') { my ($self, $c) = @_; my $image_id = $c->req->captures->[0]; $image_id =~ s/\//\\/g; my $image_obj = $c->model('File')->slurp($image_id) or $c->detach('/default'); $c->stash->{scaling} = 'fit'; $c->stash->{x} = 100; $c->stash->{image} = $image_obj; $c->forward('View::Thumbnail'); }
It can also be seen on the author's site here: It opens the file using Catalyst::Model::File. I don't see any parameters to set it to binary, so maybe that is why. But the tutorial on the author's page above doesn't mention anything about having to set the file model to binary so I dunno...

Comment on Re^2: Creating thumbnail solution help
Download Code
Replies are listed 'Best First'.
Re^3: Creating thumbnail solution help
by uG (Scribe) on Mar 06, 2010 at 03:12 UTC
    It is indeed a problem with Imager or the jpeg library it uses. I don't know if its only on a windows platform or not though. Instead i've wrote a catalyst view that uses Image::Resizer instead of Catalyst::View::Thumbnail which uses Imager.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://827088]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2015-10-04 17:33 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (103 votes), past polls