PhotoIndex

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
----------------------------
revision 1.3
date: 2002/07/10 22:42:11;  author: myneid;  state: Exp;  lines: +2 -2
took out Image Magick because it was giving too much trouble and replaced it with Imager which is available at cpan and was much easier to install
----------------------------
revision 1.2
date: 2002/02/12 15:25:57;  author: myneid;  state: Exp;  lines: +21 -0
added checking for Image::Magick
----------------------------
revision 1.1
date: 2001/10/26 17:14:36;  author: myneid;  state: Exp;
Modified to proper perl module syntax
=============================================================================

RCS file: /home/cvsroot/PhotoIndex/PhotoIndex.pm,v
Working file: PhotoIndex.pm
head: 1.19
branch:

Changes  view on Meta::CPAN

revision 1.17
date: 2002/07/10 21:30:01;  author: myneid;  state: Exp;  lines: +8 -7
Fixed HUGE bug that was causeing this to not work at all (stupid infinate loop)
----------------------------
revision 1.16
date: 2002/02/13 04:46:51;  author: myneid;  state: Exp;  lines: +4 -3
minor bug fixes
----------------------------
revision 1.15
date: 2002/02/11 23:01:17;  author: myneid;  state: Exp;  lines: +3 -2
added an undef to the $image of type Image::Magick because it doesnt destroy memory
----------------------------
revision 1.14
date: 2001/10/29 18:05:28;  author: myneid;  state: Exp;  lines: +41 -2
Finished documentation
----------------------------
revision 1.13
date: 2001/10/26 22:50:07;  author: myneid;  state: Exp;  lines: +29 -11
Integral update, part done with documentation
----------------------------
revision 1.12

Changes  view on Meta::CPAN

keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
----------------------------
revision 1.3
date: 2002/07/10 22:42:11;  author: myneid;  state: Exp;  lines: +2 -2
took out Image Magick because it was giving too much trouble and replaced it with Imager which is available at cpan and was much easier to install
----------------------------
revision 1.2
date: 2002/02/12 15:25:57;  author: myneid;  state: Exp;  lines: +21 -0
added checking for Image::Magick
----------------------------
revision 1.1
date: 2001/10/26 17:14:36;  author: myneid;  state: Exp;
Modified to proper perl module syntax
=============================================================================

RCS file: /home/cvsroot/PhotoIndex/PhotoIndex.pm,v
Working file: PhotoIndex/PhotoIndex.pm
head: 1.19
branch:

Changes  view on Meta::CPAN

revision 1.17
date: 2002/07/10 21:30:01;  author: myneid;  state: Exp;  lines: +8 -7
Fixed HUGE bug that was causeing this to not work at all (stupid infinate loop)
----------------------------
revision 1.16
date: 2002/02/13 04:46:51;  author: myneid;  state: Exp;  lines: +4 -3
minor bug fixes
----------------------------
revision 1.15
date: 2002/02/11 23:01:17;  author: myneid;  state: Exp;  lines: +3 -2
added an undef to the $image of type Image::Magick because it doesnt destroy memory
----------------------------
revision 1.14
date: 2001/10/29 18:05:28;  author: myneid;  state: Exp;  lines: +41 -2
Finished documentation
----------------------------
revision 1.13
date: 2001/10/26 22:50:07;  author: myneid;  state: Exp;  lines: +29 -11
Integral update, part done with documentation
----------------------------
revision 1.12

PhotoIndex.pm  view on Meta::CPAN

#	add writing of sizes of images to index file
#	add ability for user defined files to ignore
#	add ability to define thumbnail size
##################
package Apache::PhotoIndex;

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;
require AutoLoader;

@ISA = qw(Exporter DynaLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.

PhotoIndex.pm  view on Meta::CPAN

	$thumb->filter(type=>'autolevels');
	
	$thumb->write(file=>$dest_file) or die "writeerror on \"$source_file\": ".$image->{ERRSTR}."\n";

	undef $image;
}
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");
	$image->Write($dest_file) ;
	undef $image;
}

sub individual_template($)



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