Result:
found 240 distributions and 972 files matching your query ! ( run in 1.765 )


Math-PlanePath

 view release on metacpan or  search on metacpan

lib/Math/PlanePath.pm  view on Meta::CPAN


L<Math::Fractal::Curve>,
L<Math::Curve::Hilbert>,
L<Algorithm::SpatialIndex::Strategy::QuadTree>

PerlMagick (module L<Image::Magick>) demo scripts F<lsys.pl> and F<tree.pl>

=head1 HOME PAGE

L<http://user42.tuxfamily.org/math-planepath/index.html>

 view all matches for this distribution


Menlo

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

   - Falls back to search.cpan.org/meta service when (and only when) META.yml is not
     included or unparsable. Now it can handle distributions like AnyEvent::HTTP or
     ancient packages better.
   - Fixed a bug where nmake is doubly quoted on Win32 (charsbar) #76
   - Makes the wget/curl execution safer (J. Nick Koston)
   - Support archives where tar list begins with ./ like Image::Magick (Reported by doy) #80

1.30_11  Sun Mar  6 01:34:59 PST 2011
   - Fix SIGNATURE testing for Module::Build 0.38 or later
   - Implemented EXPERIMENTAL --scandeps command and --format option
   - Implemented EXPERIMENTAL --save-tarballs option

 view all matches for this distribution


Meta

 view release on metacpan or  search on metacpan

Meta/Image/Magick.pm  view on Meta::CPAN

#!/bin/echo This is a perl module and should not be run

package Meta::Image::Magick;

use strict qw(vars refs subs);
use Image::Magick qw();

our($VERSION,@ISA);
$VERSION="0.06";
@ISA=qw(Image::Magick);

#sub Thumb($$$);
#sub TEST($);

#__DATA__

Meta/Image/Magick.pm  view on Meta::CPAN


__END__

=head1 NAME

Meta::Image::Magick - Meta extensions to Image::Magick.

=head1 COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer;
All rights reserved.

Meta/Image/Magick.pm  view on Meta::CPAN

	VERSION: 0.06

=head1 SYNOPSIS

	package foo;
	use Meta::Image::Magick qw();
	my($image)=Meta::Image::Magick->new();
	my($thumbnail)=$object->thunb(50,50);

=head1 DESCRIPTION

Since I found there were a few methods I wanted that were missing from
Image::Magick I inherited from it and extended it. This is the result.
The original motivation was the creation of well scaled thumbnails.

=head1 FUNCTIONS

	Thumb($$$)

Meta/Image/Magick.pm  view on Meta::CPAN


=back

=head1 SUPER CLASSES

Image::Magick(3)

=head1 BUGS

None.

Meta/Image/Magick.pm  view on Meta::CPAN

	0.05 MV SEE ALSO section fix
	0.06 MV md5 issues

=head1 SEE ALSO

Image::Magick(3), strict(3)

=head1 TODO

-add method which resizes the image to the thumb size exactly.

 view all matches for this distribution


Module-Depends

 view release on metacpan or  search on metacpan

t/inline-makemaker/Makefile.PL  view on Meta::CPAN

  'VERSION_FROM'    => 'FFmpeg.pm', # finds $VERSION
  'PREREQ_PM'       => {
      Inline::C     => 0.44,
      Time::Piece   => 1.08,
      #                         Image::PBMlib => 1.06,
      #                         Image::Magick => 5.56,
  },
 );

 view all matches for this distribution


Module-MetaInfo

 view release on metacpan or  search on metacpan

test-data/03modlist.data  view on Meta::CPAN

    'Convert to/from RFC1741 HQX7 (Mac BinHex)',
    'ERYQ',
    '17'
  ],
  [
    'Image::Magick',
    'R',
    'd',
    'c',
    'O',
    'Read, query, transform, and write images',

 view all matches for this distribution


Mojolicious-Plugin-Badge

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Badge.pm  view on Meta::CPAN

package Mojolicious::Plugin::Badge;
use Mojo::Base 'Mojolicious::Plugin';

use Carp ();
use Image::Magick;
use Mojo::ByteStream;
use Mojo::File qw(path);
use Mojo::URL;
use Mojo::UserAgent;
use Mojo::Util qw(b64_encode);

lib/Mojolicious/Plugin/Badge.pm  view on Meta::CPAN


    my $svg = $c->render_to_string('badge', format => 'svg', %badge_options);

    if ($badge_options{badge_format} eq 'png') {

        my $image = Image::Magick->new(magick => 'svg');
        $image->BlobToImage($svg);

        return $image->ImageToBlob(magick => 'png');

    }

lib/Mojolicious/Plugin/Badge.pm  view on Meta::CPAN


sub _get_text_width {

    my ($text, %properties) = @_;

    my $image = Image::Magick->new;

    $properties{pointsize} ||= 110;
    $properties{text}      ||= $text;
    $properties{gravity}   ||= 'northwest';
    $properties{font}      ||= 'DejaVu-Sans';

 view all matches for this distribution


Mojolicious-Plugin-CaptchaRenderer

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/CaptchaRenderer.pm  view on Meta::CPAN

use File::Spec;

use base 'Mojolicious::Plugin';

BEGIN {
	die 'Module Image::Magick not properly installed' unless eval { require Image::Magick; 1 }
}

our $VERSION = 0.02;

sub register {

lib/Mojolicious/Plugin/CaptchaRenderer.pm  view on Meta::CPAN

	
	$app->renderer->add_helper(
		captcha => sub {
			my ($self,$code) = @_;
			
			my $img = Image::Magick->new(size => '400x400', magick => 'png');
			my $x; $x = $img->Read('gradient:#ffffff-#ffffff');
			
			$x = $img->Annotate(
				pointsize   => $conf->{'size'}, 
				fill        => $conf->{'color'}, 

 view all matches for this distribution


Music-Tag-Amazon

 view release on metacpan or  search on metacpan

lib/Music/Tag/Amazon.pm  view on Meta::CPAN

    if ( substr( $art, 0, 6 ) eq "GIF89a" ) {
        $self->status( 0, "Current cover is gif, skipping" );
        return;
    }

    #   my $image = Image::Magick->new(magick=>'jpg');
    #   $image->Resize(width=>300, height=>300);
    #   $image->BlobToImage($art);

    my $picture = {
        "Picture Type" => "Cover (front)",

 view all matches for this distribution


Muster

 view release on metacpan or  search on metacpan

lib/Muster/Hook/Img.pm  view on Meta::CPAN

use Muster::Hooks;
use Muster::Hook::Links;
use File::Basename qw(basename);
use File::Spec;
use File::Slurper 'write_binary';
use Image::Magick;
use YAML::Any;

use Carp 'croak';

=head1 METHODS

lib/Muster/Hook/Img.pm  view on Meta::CPAN

        $dwidth = $w if length $w;
        $dheight = $h if length $h;
    }
    else
    {
        my $im = Image::Magick->new();
        my $r = $im->Read(filename=>$img_info->{filename});
        croak sprintf(("C. failed to read %s: %s"), $imgpage, $r) if $r;

        if (! defined $im->Get("width") || ! defined $im->Get("height"))
        {

lib/Muster/Hook/Img.pm  view on Meta::CPAN

            my $outfile = File::Spec->catfile($self->{img_dir}, $params{size} . '-' . $thumb_base);
            $imglink = $self->{img_url} . $params{size} . '-' . $thumb_base;

            if (-e $outfile && (-M $img_info->{filename} >= -M $outfile))
            {
                $im = Image::Magick->new;
                $r = $im->Read($outfile);
                croak sprintf("D. failed to read %s: %s", $outfile, $r) if $r;
            }
            else
            {

 view all matches for this distribution


Net-IMP-HTTP

 view release on metacpan or  search on metacpan

lib/Net/IMP/HTTP/Example/FlipImg.pm  view on Meta::CPAN

    'image',   # collected octets for image
);

use Net::IMP;  # import IMP_ constants
use Net::IMP::Debug;
use Image::Magick;
use constant MAX_SIZE => 2**16;

sub RTYPES { ( IMP_PASS, IMP_REPLACE ) }
sub new_analyzer {
    my ($factory,%args) = @_;

lib/Net/IMP/HTTP/Example/FlipImg.pm  view on Meta::CPAN

	}

	return;
    }

    # end of image reached, flip with Image::Magick
    debug("flip image size=%d",length($self->{image}));
    my $img = Image::Magick->new;
    debug("failed to flip img: $@") if ! eval {
	$img->BlobToImage($self->{image});
	$img->Flip;
	($self->{image}) = $img->ImageToBlob;
	debug("replace with ".length($self->{image})." bytes");

 view all matches for this distribution


Nginx-Module-Gallery

 view release on metacpan or  search on metacpan

lib/Nginx/Module/Gallery.pm  view on Meta::CPAN

use File::Path qw(make_path);
use File::Temp qw(tempfile);
use File::Find;
use Digest::MD5 'md5_hex';
use URI::Escape qw(uri_escape);
use Image::Magick;

# MIME definition objects
our $mimetypes = MIME::Types->new;
our $mime_unknown   = MIME::Type->new(
    simplified  => 'unknown/unknown',

lib/Nginx/Module/Gallery.pm  view on Meta::CPAN

sub _get_image_thumb($)
{
    my ($path) = @_;

    # Get image and attributes
    my $image = Image::Magick->new;
    $image->Read($path);
    my ($image_width, $image_height, $image_size) =
        $image->Get("width", "height", "filesize");

    # Save image on disk:

 view all matches for this distribution


OCBNET-WebSprite

 view release on metacpan or  search on metacpan

lib/OCBNET/Image.pm  view on Meta::CPAN

# This file is part of OCBNET-WebSprite (GPL3)
####################################################################################################
package OCBNET::Image;
####################################################################################################
# implementation agnostic image library for OCBNET-WebSprite
# will either use GD, Image::Magick or Graphics::Magick
####################################################################################################
our $VERSION = '1.0.1';
####################################################################################################

use Carp;

lib/OCBNET/Image.pm  view on Meta::CPAN

elsif (eval { $OCBNET::Image::IM::VERSION }) { $module = "im" }

# check for pre-loaded library next
elsif (eval { $GD::VERSION }) { $module = "gd" }
elsif (eval { $Graphic::Magick::VERSION }) { $module = "gm" }
elsif (eval { $Image::Magick::VERSION }) { $module = "im" }

# finally try to load an implementation on my own
elsif (eval { require OCBNET::Image::GD }) { $module = "gd" }
elsif (eval { require OCBNET::Image::GM }) { $module = "gm" }
elsif (eval { require OCBNET::Image::IM }) { $module = "im" }

 view all matches for this distribution


OpenGL-GLUT

 view release on metacpan or  search on metacpan

test.pl  view on Meta::CPAN

my $hasIM_635 = $hasImage && OpenGL::Image::HasEngine('Magick','6.3.5');

eval 'error(use OpenGL::Shader';
my $hasShader = !$@;

eval 'error(use Image::Magick';
my $hasIM = !$@;

eval 'use Time::HiRes qw( gettimeofday )';
my $hasHires = !$@;
$|++;

test.pl  view on Meta::CPAN

  # Benchmarks for Image Loading
  if (DO_TESTS && $hasIM)
  {
    my $loops = 1000;

    my $im = new Image::Magick();
    $im->Read($Tex_File);
    $im->Set(magick=>'RGBA',depth=>8);
    $im->Negate(channel=>'alpha');


 view all matches for this distribution


OpenGL-Image

 view release on metacpan or  search on metacpan

Image/Magick.pm  view on Meta::CPAN

############################################################
#
# OpenGL::Image::Magick - Copyright 2007 Graphcomp - ALL RIGHTS RESERVED
# Author: Bob "grafman" Free - grafman@graphcomp.com
#
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
############################################################

package OpenGL::Image::Magick;

require Exporter;

use Carp;

Image/Magick.pm  view on Meta::CPAN




=head1 NAME

  OpenGL::Image::Magick - copyright 2007 Graphcomp - ALL RIGHTS RESERVED
  Author: Bob "grafman" Free - grafman@graphcomp.com

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

Image/Magick.pm  view on Meta::CPAN


  Note: OpenGL::Image defaults to this module.

  This is a subclass of the OpenGL::Image::Common module.

  Requires the Image::Magick module; 6.3.5 or newer is recommended.


=head1 SYNOPSIS

  ##########

Image/Magick.pm  view on Meta::CPAN

  # Get image blob.
  my $blob = $img->GetBlob();

=cut

eval 'use Image::Magick';


# Get engine version
sub EngineVersion
{
  return $Image::Magick::VERSION;
}

# Get engine description
sub EngineDescription
{

Image/Magick.pm  view on Meta::CPAN


  # Use source image if supplied
  my $img;
  if ($self->{params}->{source})
  {
    $img = new Image::Magick();
    return undef if (!$img);

    my $stat = $img->Read($self->{params}->{source});
    return undef if ($stat);

Image/Magick.pm  view on Meta::CPAN

    my $blob = $self->{params}->{blob};

    if ($w && $h)
    {
      my $dim = $w.'x'.$h;
      $self->{native} = new Image::Magick(size=>$dim, magick=>'RGBA', depth=>8);
    }
    elsif ($blob)
    {
      $self->{native} = new Image::Magick();
    }
    return undef if (!$self->{native});
    $img = $self->{native};

    # Populate with blob

 view all matches for this distribution


OpenGL-QEng

 view release on metacpan or  search on metacpan

lib/Games/Quest3D.pm  view on Meta::CPAN


    * OpenGL::Image

    * Math::Trig

    * Image::Magick module; 6.3.5 or newer is recommended.

    * File::ShareDir

=head1 AUTHORS

 view all matches for this distribution


OpenGL

 view release on metacpan or  search on metacpan

test.pl  view on Meta::CPAN

my $hasIM_635 = $hasImage && OpenGL::Image::HasEngine('Magick','6.3.5');

eval 'use OpenGL::Shader';
my $hasShader = !$@;

eval 'use Image::Magick';
my $hasIM = !$@;

eval 'use Time::HiRes qw( gettimeofday )';
my $hasHires = !$@;
$|++;

test.pl  view on Meta::CPAN

  # Benchmarks for Image Loading
  if (DO_TESTS && $hasIM)
  {
    my $loops = 1000;

    my $im = Image::Magick->new();
    $im->Read($Tex_File);
    $im->Set(magick=>'RGBA',depth=>8);
    $im->Negate(channel=>'alpha');


 view all matches for this distribution


OpenIndex

 view release on metacpan or  search on metacpan

OpenIndex.pm  view on Meta::CPAN

        $list{$file}{modnice} =~ s/\s/&nbsp;/g;
        $list{$file}{mode} = write_mod((stat _)[2]);
        $list{$file}{type}  = $subr->content_type;
        if(($list{$file}{type} =~ m:^image/:o) && 
	   ($cfg->{options} & THUMBNAILS ) && 
	   Apache->module("Image::Magick")) {
            if ($iconfig->{cache_ok}) {
                ($list{$file}{icon},$list{$file}{width},$list{$file}{height}) = get_thumbnail($r, $file, $list{$file}{mod}, $list{$file}{type}, @accept);
	    }
	}
        $list{$file}{height} ||= $cfg->{icon_height};

OpenIndex.pm  view on Meta::CPAN

 my $dir = $r->filename;
#these should sound better.
 my $cachedir = $iconfig->{cache_dir};
 my $xresize;
 my $yresize;
 my $img = Image::Magick->new;
 my($imgx, $imgy, $img_size, $img_type) = split(',', $img->Ping($dir . $filename));
#Is the image OK?
    return "/icons/broken.gif" unless ($imgx && $imgy);
    if (($content =~ /$content/) && ($img_type =~ /JPE?G|GIF|PNG/i)) {
	if ($dir =~ /$cachedir\/$/) {	#We know that what we'll generate will be seen.

OpenIndex.pm  view on Meta::CPAN

=head1 SYNOPSIS

  PerlModule Apache::Icon
  PerlModule Apache::OpenIndex
  (PerlModule Apache::Language) optional
  (PerlModule Image::Magick)    optional

=head1 DESCRIPTION

OpenIndex provides a file manager for a web sites through a web
browser. It is a extensive rewrite of the Apache::AutoIndex.pm

OpenIndex.pm  view on Meta::CPAN


That can be done in 2 ways. In the case the image is pretty
small, no actual thumbnail will be created. Instead the image
will resize the HEIGHT and WIDTH attributes of the IMG tag.

If the image is big enough, Image::Magick will resize it and
save (cache) it in the .thumbnails directory for the next
requests.

Changing configuration options will correctly refresh the cached
thumbnails. Also, if the original image is modified, the

OpenIndex.pm  view on Meta::CPAN

Some form of garbage collection should be performed on thumbnail
cache or the directories will fill up.

=head1 SEE ALSO

perl(1), L<Apache>(3), L<Apache::Icon>(3), L<Image::Magick>(3) .
L<Apache::AutoIndex>(3)
    
=head1 SUPPORT

Please send any questions or comments to the Apache modperl 

 view all matches for this distribution


PDF-OCR2

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

    http://search.cpan.org and search for 'Image::OCR::Tesseract'.

    There are INSTALL.* readme files in the package Image::OCR::Tesseract
    that may want to look through.

   Image::Magick
    Should already be available ( via previously installing imagemagick ).

BUGS
    I am very open to corrections, suggestions, hints, tips, criticism. I am
    not a know-it-all, I have been able to do and share some useful things

 view all matches for this distribution


PPresenter

 view release on metacpan or  search on metacpan

PPresenter/Decoration.pm  view on Meta::CPAN

{   my ($deco, $geom) = (shift, shift);

    if(defined $geom)
    {   foreach (@_)
        {   next unless ref $_;
            next if $_->isa('PPresenter::Image::Magick');
            # Photo objects are already sized.
            die "-nestImages geometry only on filenames and Magick objects.\n";
        }
    }
    else

 view all matches for this distribution


Panotools-Script

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - read and write hugin image metadata and options in comment lines
    - remove pto2tiff-gui due to conflict with hugin_stitch_project
    - add .desktop files for Linux gui integration

0.11
    - replace Image::Magick with Image::Size for sizing images
    - jpeg2qtvr fix CRLF bug on windows
    - fix cubic2erect (Peter Crowley)

0.09
    - Stitch() method, fix stupid bug introduced by trying to fix windows bugs

 view all matches for this distribution


Parley

 view release on metacpan or  search on metacpan

lib/Parley/Controller/My.pm  view on Meta::CPAN

use warnings;

use Parley::Version;  our $VERSION = $Parley::VERSION;
use base 'Catalyst::Controller';

use Image::Magick;
use JSON;
use Image::Size qw( html_imgsize imgsize );

use Parley::App::Error qw( :methods );

lib/Parley/Controller/My.pm  view on Meta::CPAN


    # get the image dimensions
    my ($width, $height) = imgsize($file);

    # create a new image mangling object
    my $img = Image::Magick->new()
        or die $!;

    # read in the image file
    $img->Read($file);

 view all matches for this distribution


Parse-CPAN-Modlist

 view release on metacpan or  search on metacpan

t/data/03modlist.data  view on Meta::CPAN

'Convert to/from RFC1741 HQX7 (Mac BinHex)',
'ERYQ',
'17'
],
[
'Image::Magick',
'R',
'd',
'c',
'O',
'?',

 view all matches for this distribution


Perl-Visualize

 view release on metacpan or  search on metacpan

Visualize.pm  view on Meta::CPAN

  BOTTLES
  }

This subroutine prints out one verse of the song given the number of
bottles that remain.  Next we need some code to produce a picture of a
wall with beer bottles on it.  For this we will use, Image::Magick.
Image::Magick is a toolkit for editing a large variety of image
formats programmatically. We will use it to generate our GIF images on
the fly.

  sub drawWall {
    my($image, $width,$height) = @_;

Visualize.pm  view on Meta::CPAN

  #!/usr/bin/perl
  
  $_=<<'CODE';
  use strict;
  use Perl::Visualize;
  use Image::Magick;
  
  sub printMessage {...}
  sub drawWall {...}
  sub drawBottle {...}
  sub drawBottles {...}
  
  my $width = 600;
  my $height = 100;
  my $bottles = 5;
  my $image = Image::Magick->new(size=>"${width}x$height");
  my $warn;
  
  $image->ReadImage('xc:white');
  
  printMessage $bottles;

 view all matches for this distribution


PerlMagick

 view release on metacpan or  search on metacpan

Magick.pm  view on Meta::CPAN

package Image::Magick;

#  Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
#  dedicated to making software imaging solutions freely available.
#
#  You may not use this file except in compliance with the License.  You may

Magick.pm  view on Meta::CPAN

    }
    eval "sub $AUTOLOAD { $val }";
    goto &$AUTOLOAD;
}

bootstrap Image::Magick $VERSION;

# Preloaded methods go here.

sub new
{
    my $this = shift;
    my $class = ref($this) || $this || "Image::Magick";
    my $self = [ ];
    bless $self, $class;
    $self->set(@_) if @_;
    return $self;
}

sub New
{
    my $this = shift;
    my $class = ref($this) || $this || "Image::Magick";
    my $self = [ ];
    bless $self, $class;
    $self->set(@_) if @_;
    return $self;
}

Magick.pm  view on Meta::CPAN

1;
__END__

=head1 NAME

Image::Magick - objected-oriented Perl interface to ImageMagick. Use it to read, manipulate, or write an image or image sequence from within a Perl script.

=head1 SYNOPSIS

  use Image::Magick;
  $p = new Image::Magick;
  $p->Read("imagefile");
  $p->Set(attribute => value, ...)
  ($a, ...) = $p->Get("attribute", ...)
  $p->routine(parameter => value, ...)
  $p->Mogrify("Routine", parameter => value, ...)

 view all matches for this distribution


PhotoIndex

 view release on metacpan or  search on metacpan

PhotoIndex.pm  view on Meta::CPAN


use strict;
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Apache::Constants qw(:common OPT_INDEXES DECLINE_CMD REDIRECT DIR_MAGIC_TYPE);
#use Image::Magick;
use Imager;
use Apache;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
require Exporter;
require DynaLoader;

PhotoIndex.pm  view on Meta::CPAN

}
sub create_thumbnail_imagemagick($$)
{
	my($source_file, $dest_file) = @_;
	my $percent = .20;
	my  $image = Image::Magick->new;
	$image->ReadImage($source_file);
	my ($width, $height) = $image->Get('base-columns', 'base-rows');
	my $newwidth = $width * $percent;
	my $newheight = $height * $percent;
	$image->Scale(width=>"$newwidth", height=>"$newheight");

 view all matches for this distribution


Photography-Website

 view release on metacpan or  search on metacpan

bin/photog-preview  view on Meta::CPAN

EOF
and exit if @ARGV < 4;

# The following code builds an array of command arguments to be used
# in a system() call to ImageMagick's `convert`. It would probably
# make more sense to use Image::Magick instead, but I have no idea how.

my @command;
my @images = @ARGV[0 .. @ARGV-2];
my $destination = $ARGV[-1];

 view all matches for this distribution


Piet-Interpreter

 view release on metacpan or  search on metacpan

Interpreter.pm  view on Meta::CPAN

package Piet::Interpreter;

use 5.6.0;   #  or so.
use strict;
use Carp;
use Image::Magick;

our $VERSION = '0.03';

=head1 NAME

Interpreter.pm  view on Meta::CPAN

of instructions and program flow.  See the above URL for more details.
(Note: some sample programs there may not work, as they were
constructed before a working interpreter was available.)

Since Piet is a visual language, an image parsing mechanism is
required.  This module uses Image::Magick, so it would be to your
advantage to download, install, and test that module and its
related stuff before trying to use this one.  

=cut

Interpreter.pm  view on Meta::CPAN


=item $piet->image('myprog.gif');

Loads in a program image from the specified file.  The interpreter was
designed and tested using gif images, but any format that is supported
by Image::Magick should work just fine.  Once the file has been
loaded, it is inspected and processed, creating a run-matrix and
determining some useful properties from the image.  

Note: Be sure to set the codel size, if needed, before loading the
image.  Otherwise, a size of 1 will be assumed, and the codel columns

Interpreter.pm  view on Meta::CPAN

    } 

    #  Read file into object and process

    $self->{_filename}  = $file;
    $self->{_image}     = Image::Magick->new;
    $self->{_image}->Read($file);

    $self->_process_image;
}

 view all matches for this distribution


Plack-App-ImageMagick

 view release on metacpan or  search on metacpan

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN

  $Plack::App::ImageMagick::AUTHORITY = 'cpan:AJGB';
}
BEGIN {
  $Plack::App::ImageMagick::VERSION = '1.110990';
}
# ABSTRACT: Create and manipulate images with Image::Magick

use strict;
use warnings;

use parent qw( Plack::Component );

use Image::Magick;
use Plack::App::File;
use File::Spec ();
use JSON::XS ();
use Digest::MD5 ();
use Plack::Request;

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN

            return $self->_create_response_from_cache( $env, $cached_file );
        }
    }

    my $handler;
    my $img = Image::Magick->new;

    if ( my $commands = $self->apply ) {

        # expand options from query string
        if ( my $with_query = $self->with_query ) {

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN


        # create handler from commands
        $handler = sub {
            my ($app, $env, $img) = @_;

            unless ( ref $img eq 'Image::Magick' ) {
                warn "Invalid object $img, required Image::Magick";
                return http_response_500();
            }

            # working on existing image
            if ( my $img_root = $self->root ) {

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN

    if ( defined $handler ) {

        if ( my $pre_process = $self->pre_process ) {
            $img = $pre_process->($self, $env, $img);

            unless ( ref $img eq 'Image::Magick' ) {
                warn "Invalid object $img, required Image::Magick";
                return http_response_500();
            }
        }

        if ( my $out = $handler->($self, $env, $img) ) {
            if ( ref $out ne 'Image::Magick' ) {
                return $out;
            }

            if ( my $post_process = $self->post_process ) {
                $out = $post_process->($self, $env, $out);

                unless ( ref $out eq 'Image::Magick' ) {
                    warn "Invalid object $out, required Image::Magick";
                    return http_response_500();
                }

            }

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN

sub _create_response_from_cache {
    my ($self, $env, $file_path, $content_type) = @_;

    # discover content type from cached file
    unless ( $content_type ) {
        my $img = Image::Magick->new;
        my $format = ($img->Ping( $file_path ))[3];
        $content_type = $img->MagickToMime( $format );
    };


lib/Plack/App/ImageMagick.pm  view on Meta::CPAN


=encoding utf-8

=head1 NAME

Plack::App::ImageMagick - Create and manipulate images with Image::Magick

=head1 VERSION

version 1.110990

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN

        mount "/captcha/" => $captcha_app;
    }

=head1 DESCRIPTION

Use L<Image::Magick> to create and manipulate images for your web applications.

=head1 CONFIGURATION

You need to supply L<"apply"> or L<"handler"> configuration options. All other
parameters are optional.

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN


Reference to current C<$env>.

=item C<$img>

Reference to L<Image::Magick> object created with:

    my $img = Image::Magick->new();

=back

I<Note:> if returned C<@$img> object contains more then one layer C<FlattenImage()> is called
before rendering.

lib/Plack/App/ImageMagick.pm  view on Meta::CPAN


=over 4

=item *

L<Image::Magick>

=item *

L<Plack>

 view all matches for this distribution


Plack-Middleware-Image-Scale

 view release on metacpan or  search on metacpan

lib/Plack/Middleware/Image/Scale.pm  view on Meta::CPAN

    }

    my $output;
    if (defined $orig_ct and $orig_ct eq 'application/pdf') {
        try {
            Class::Load::load_class('Image::Magick::Thumbnail::PDF');
            Class::Load::load_class('File::Temp');
            my $in = File::Temp->new( SUFFIX => '.pdf' );
            my $out = File::Temp->new( SUFFIX => '.png' );
            $in->write( $$bufref ); $in->close;
            Image::Magick::Thumbnail::PDF::create_thumbnail(
                $in->filename, $out->filename, $flag{p}||1, {
                    frame => 0, normalize => 0,
                    restriction => max($width, $height),
                }
            );

 view all matches for this distribution


Prima

 view release on metacpan or  search on metacpan

pod/Prima/Image.pod  view on Meta::CPAN


Although it is possible to perform all kinds of calculations and modification
with the pixels, returned by C<::data>, it is not advisable unless the speed
does not matter. Standalone PDL package with help of L<PDL::PrimaImage>
package, and Prima-derived IPA package provide routines for data and image
analysis.  Also, L<Prima::Image::Magick> connects L<ImageMagick> with Prima.
I<Prima::Image> itself provides only the simplest statistic information,
namely: lowest and highest pixel values, pixel sum, sum of square pixels, mean,
variance, and standard deviation.

=head2 Standalone usage

pod/Prima/Image.pod  view on Meta::CPAN


L<Prima>, L<Prima::Drawable>, L<Prima::image-load>, L<Prima::codecs>.

L<PDL>, L<PDL::PrimaImage>, L<IPA>

L<ImageMagick>, L<Prima::Image::Magick>

 view all matches for this distribution


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