GD::Convert

GD::Convert is a Perl module with additional output formats for GD.
Download

GD::Convert Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Slaven Rezic
  • Publisher web site:
  • http://search.cpan.org/~srezic/

GD::Convert Tags


GD::Convert Description

GD::Convert is a Perl module with additional output formats for GD. GD::Convert is a Perl module with additional output formats for GD.SYNOPSIS use GD; use GD::Convert qw(gif=gif_netpbm newFromGif=newFromGif_imagemagick wbmp); # or: require GD::Convert; import GD::Convert; ... $gd->ppm; $gd->xpm; $gd->gif; $gd->wbmp; ... $gd = GD::Image->newFromPpmData(...); $gd = GD::Image->newFromGif(...);This module provides additional output methods for the GD module: ppm, xpm, wbmp, gif_netpbm and gif_imagemagick, and also additional constructors: newFromPpm, newFromPpmData, newFromGif_netpbm, newFromGifData_netpbm, newFromGif_imagemagick, newFromGifData_imagemagick.The new methods go into the GD namespace.For convenience, it is possible to set shorter names for the gif, newFromGif and newFromGifData methods by providing one of the following strings in the import list:gif=gif_netpbm newFromGif=newFromGif_netpbm newFromGifData=newFromGifData_netpbmUse external commands from netpbm to load and create GIF images.gif=gif_imagemagick newFromGif=newFromGif_imagemagick newFromGifData=newFromGifData_imagemagickUse external commands from imagemagick to load and create GIF images.gif=any newFromGif=any newFromGifData=anyUse any of the above methods to load and create GIF images.wbmpCreate wbmp images. Only necessary for GD before version 1.26, but it does not hurt if it is included with newer GD versions.The new methods and constructors:$ppmdata = $image->ppmTake a GD image and return a string with a PPM file as its content.$xpmdata = $image->xpmTake a GD image and return a string with a XPM file as its content.$gifdata = $image->gif_netpbm()Take a GD image and return a string with a GIF file as its content. The conversion will use the ppmtogif binary from netpbm. Make sure that ppmtogif is actually in your PATH. If you specify gif=gif_netpbm in the use line, then you can use the method name gif instead.The gif_netpbm handles the optional parameter -transparencyhack. If set to a true value, a transparent GIF file will be produced. Note that this will not work if the transparent color occurs also as a normal color.$gifdata = $image->gif_imagemagickThis is the same as gif_netpbm, instead it is using the convert program of ImageMagick.$image = GD::Image->newFromPpm($file, )Create a GD image from the named ppm file or filehandle reference. Only raw ppm files (signature P6) are supported.$image = GD::Image->newFromPpmData($data, )Create a GD image from the data string containing ppm data. Only raw ppm files are supported.$image = GD::Image->newFromGif_netpbm($file, );Create a GD image from the named file or filehandle reference using external netpbm programs.$image = GD::Image->newFromGifData_netpbm($file, );Create a GD image from the data string using external netpbm programs.$image = GD::Image->newFromGif_imagemagick($file, );Create a GD image from the named file or filehandle reference using external ImageMagick programs.$image = GD::Image->newFromGifData_imagemagick($file, );Create a GD image from the data string using external ImageMagick programs.You can set the variable $GD::Convert::DEBUG to a true value to get some information about external commands used while converting. Requirements: · Perl


GD::Convert Related Software