Apache2-ApacheMobileFilter

 view release on metacpan or  search on metacpan

CHANGE  view on Meta::CPAN

Optimize detection logic
Introduce new configuration parameter PersonalWurflFileName

ApacheMobileFilter 3.23
Improve sophoisticated Android Detection (check correct OS version)
Fixed minor bugs, wrong message for AMFMobileHome.

ApacheMobileFilter 3.22
Fixed bugs on FallBack function
Optimize device detection logic.
Change resize mechanism for jpg and png file, now it's faster and managed transparency images.
Improve sophisticated Android Detection

ApacheMobileFilter 3.21
Fixed bugs for mobile bot

ApacheMobileFilter 3.20
New detection for Android Device
New detection for bot. Thanks to Cristobal.

ApacheMobileFilter 3.12

lib/Apache2/AMFImageRendering.pm  view on Meta::CPAN

  my $listall="false";
  my $resizeimagesmall="false";
  my $par_height='height';
  my $par_width='width';
  my $par_perc='dim';
  my $typeGraphicLibrary='gd';
  my $filterMagick='Lanczos';
  my $qualityImage=90;
  my $maxAgeImage=99999999999999999;

  $ImageType{'image/png'}="png";
  $ImageType{'image/gif'}="gif";
  $ImageType{'image/jpg'}="jpg";
  $ImageType{'image/jpeg'}="jpeg";
  
  #
  # Check if MOBILE_HOME is setting in apache httpd.conf file for example:
  # PerlSetEnv MOBILE_HOME <apache_directory>/MobileFilter
  #
  $CommonLib->printLog("---------------------------------------------------------------------------"); 
  $CommonLib->printLog("AMFImageRendering Version $VERSION");

lib/Apache2/AMFImageRendering.pm  view on Meta::CPAN

										if ($in->tags(name => 'gif_local_map')) {
									  $scaled->settag(name => 'gif_local_map', value => 1);
										}
									  
										push @out, $scaled;
										}
										my $dummy=$imagefile.".gif";
										Imager->write_multi({ file => $dummy }, @out) or die "Cannot save $imagefile: ", Imager->errstr, "\n";
										rename($dummy, $imagefile);
								  } 
								  if ($content_type eq "image/png") {
                    if ($typeGraphicLibrary eq 'gd') {
                      my $img = Image::Scale->new("$imageToConvert") ;
                      $img->resize_gd( { width => $width } );
                      $img->save_png("$imagefile");
                    } else {
                        my $img = Image::Magick->new;
                        $img->Read($imageToConvert);
                        $img->Comment("Resized by AMF (http://www.apachemobilefilter.org)");
                        $img->Set(quality=>$qualityImage);
                        $img->Resize(geometry => $width);
                        $img->Write($imagefile);
                    }
								  }
								  if ($content_type eq "image/jpeg") {

lib/Apache2/AMFImageRendering.pm  view on Meta::CPAN

 	  }      
      return $return_value;
      
} 

1;


=head1 NAME

Apache2::AMFImageRendering - Used to resize images (jpg, png, gif gifanimated) on the fly to adapt to the screen size of the mobile device

=head1 DESCRIPTION

This module have the scope to manage with AMF51DegreesFilter, AMFDetectRightFilter and AMFWURFLFilter module the images for mobile devices. 

For more details: http://wiki.apachemobilefilter.org

=head1 AMF PROJECT SITE

http://www.apachemobilefilter.org



( run in 0.853 second using v1.01-cache-2.11-cpan-df04353d9ac )