Giter VIP home page Giter VIP logo

catalyst--view--gd--thumbnail's Introduction

NAME
    Catalyst::View::GD::Thumbnail - Catalyst view to resize images for
    thumbnails.

SYNOPSIS
        Create a thumbnail view:

            script/myapp_create view Thumbnail Thumbnail

        Then in your controller:

            sub thumbnail :Local :Args(1) {
                    my ($self, $c, $image_file_path) = @_;

                    $c->stash->{x}     = 100;    
                    # Create a 100px wide thumbnail

                    #or

                    $c->stash->{y}     = 100;    
                    # Create a 100px tall thumbnail

                    $c->stash->{image} = $image_file_path;        
                    $c->forward('View::Thumbnail');
            }

DESCRIPTION
    Catalyst::View::GD::Thumbnail resizes images to produce thumbnails, with
    options to set the desired x or y dimensions. Uses the GD image library
    for those who are already using something more advanced than Imager.

  Options
    The view is controlled by setting the following values in the stash:

    image
        Contains the file path for the full-size source image.

        This is a mandatory option.

    x   The width (in pixels) of the thumbnail.

        This is optional, but at least one of the "x" or "y" parameters must
        be set.

    y   The height (in pixels) of the thumbnail.

        This is optional, but at least one of the "x" or "y" parameters must
        be set.

  Image formats
    The generated thumbnails will always be produced in the same format
    (PNG, JPG, etc) as the source image.

    Catalyst::View::GD::Thumbnail uses the Image::Resize module to crop and
    resize images, so it accept any image format supported by
    *Image::Resize*: bmp, gif, jpeg, png, xbm, xpm.

    Please see the Image::Resize documentation for more details and
    installation notes.

BUGS
    Please report any bugs or feature requests to
    "bug-catalyst-view-thumbnail at rt.cpan.org", or through the web
    interface at
    <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-View-GD-Thumbna
    il>. I will be notified, and then you'll automatically be notified of
    progress on your bug as I make changes.

AUTHOR
    Nick Logan (ugexe) <[email protected]>

LICENSE AND COPYRIGHT
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.