Bootylicious-Plugin-Gallery

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Bootylicious::Plugin::Gallery

0.07 21-01-2010
	Using Mojolicious::Plugin system now
	fix build gallery dir
	
0.6 14-12-2009
	Makefile.pl fix (add  Image::Magick dependence)
	Updated due to bootylicious internal changes (vti)
	
0.5 22-11-2009
	Prepared for CPAN

META.yml  view on Meta::CPAN

author:
  - 'Konstantin Kapitanov <perlovik@gmail.com>'
generated_by: 'Dist::Zilla version 1.093250'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: Bootylicious-Plugin-Gallery
requires:
  Digest::MD5: 0
  Image::Magick: 6.00
  Image::Magick::Thumbnail::Fixed: 0
  Mojo: 0.999910
version: 0.07

Makefile.PL  view on Meta::CPAN

WriteMakefile(
  DISTNAME  => 'Bootylicious-Plugin-Gallery',
  NAME      => 'Bootylicious::Plugin::Gallery',
  AUTHOR    => "Konstantin\ Kapitanov\ \<perlovik\@gmail\.com\>",
  ABSTRACT  => "Gallery\ plugin\ for\ Bootylicious",
  VERSION   => '0.07',
  EXE_FILES => [ qw() ],
  (eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
  PREREQ_PM    => {
    "Mojo" => '0.999910',
    "Image::Magick::Thumbnail::Fixed" => '0',
    "Digest::MD5" => '0',
    "Image::Magick" => '6.00',
  },
  test => {TESTS => 't/*.t'}
);

dist.ini  view on Meta::CPAN

name    = Bootylicious-Plugin-Gallery
version = 0.07
author  = Konstantin Kapitanov <perlovik@gmail.com>
license = Perl_5
copyright_holder = Konstantin Kapitanov

[@Classic]

[Prereq]
Image::Magick = 6.00
Mojo          = 0.999910
Digest::MD5	  = 0
Image::Magick::Thumbnail::Fixed = 0

lib/Bootylicious/Plugin/Gallery.pm  view on Meta::CPAN

package Bootylicious::Plugin::Gallery;

use strict;
use warnings;
use base 'Mojolicious::Plugin';

use Digest::MD5 qw( md5_hex );
use Image::Magick::Thumbnail::Fixed;

our $VERSION = '0.07';

my %content_types = (
    'jpg'  => 'image/jpeg',
    'jpeg' => 'image/jpeg',
    'gif'  => 'image/gif',
    'png'  => 'image/png'
);

lib/Bootylicious/Plugin/Gallery.pm  view on Meta::CPAN



    return $self->_create_thubnail($c, $opts);
}

sub _create_thubnail {
    my $self = shift;
    my $c    = shift;
    my $opts = shift;

    my $t = Image::Magick::Thumbnail::Fixed->new();

    $t->thumbnail(
        input   => $opts->{source_file},
        output  => $opts->{cached_file},
        width   => $self->thumb_width,
        height  => $self->thumb_height,
        bgcolor => $self->bgcolor,
    );

    return;



( run in 1.220 second using v1.01-cache-2.11-cpan-beeb90c9504 )