ImageMagick images

PPresenter
Manual
Images

Options:

functions
Examples

An important part of the design of Portable Presenter is the requirement for screen-size independency; fonts and also images are scaled, dependent on the actual screen-size.

\begin{commercial}
ImageMagick is an excelent package which is able to read, convert, modify, and write close to every type of image from script and from a graphical interface. Install it now!
\end{commercial}
PPresenter will automatically use Image::Magick when it is installed. There is no performance reason to decide differently.

You can defined Image::Magick images in two ways:

  • Implicit: use an image in your slide description, for instance with
      $show->addSlide(-main => '<IMG SRC=image.xpm>');
    
    In this case, you have created a Tk::Photo object via an Image::Magick object, but are not able to control it. Why not directly a Tk::Photo? Because now you can use any image format, and get very nice scaling results for free!

  • Explicit: define an image and refer to it later. In contrary to Tk::Photo objects, the Image::Magick objects are not window dependent until displayed.
The explicit way is demonstrated on this page. The implicit way is the same for Tk::Photo objects and Image::Magick object, which is described on the main image page.

Magick options

There are no special options for Image::Magick objects: the general options define all.

ImageMagick functions

If you want to create images with ImageMagick, you do not need to read the documentation of PPresenter: they are not connected at all. A small example to demonstrate:
   use PPresenter;
   use Image::Magick;

   my $image = Image::Magick->new;
   $image->Read('image.tiff');
   $image->Scale('25%x50%');
   ...

   my $show = PPresenter->new;
   $show->image($image, -name => 'image');
On the moment you add the image to the show, the Magick structure is taken. You should not try to change the object after this.
$show->image(image, ..., image, options )
Add one or more images to PPresenter. Is equivalent to
map {$show->image($_, options)}
    image, image, ...;

Examples

Example 1: Own symbols for unordered lists

Usually, the dots used to precede a list-item in an unordered list (for instance used by the markup formatter), is defined by the decoration option -nestImages. The dots can be specified as filename or as objects.

   use PPresenter;
   use Image::Magick;

   my $dots = Image::Magick->new;
   $dots->Read('redball.gif', 'blueball.pct');

   my $show = PPresenter->new;
   my @p    = $show->image(@$dots);
   $show->change( decoration  => 'ALL'
                , -nestImages => [ undef, @p ] )
One Image::Magick can contain a list of images.


Portable Presenter is written and maintained by Mark Overmeer. Copyright (C) 2000-2002, Free Software Foundation FSF.