Linux SoftwareProgrammingLibrariesGimp::OO 1.211

Gimp::OO 1.211


Gimp::OO is a Perl module with pseudo-OO for Gimp functions. SYNOPSIS use Gimp; # Gimp::OO is now part of Gimp.
Developer:   Marc Lehmann
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   266K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Gimp::OO is a Perl module with pseudo-OO for Gimp functions.

SYNOPSIS

use Gimp; # Gimp::OO is now part of Gimp.

As you might have noticed, you can sort most gimp functions fall into three groups, depending on the name-prefix: gimp_, plug_in_, extension_ etc..

Whats more, there are functions groups like gimp_image_ or gimp_selection_, operating on a common object, Images and Selection in this case.

If you only had the plain syntax, your scripts would quickly aquire the "vertical gimp syndrome":

gimp_palette_set_foreground(...)
gimp_layer_new(...)
gimp_palette_set_background(...)
gimp_image_add_layer(...)

etc. Of course, your fingers will suffer from severe injuries as well.

A solution to this situation is to use OO-syntax. Gimp plays some (very) dirty tricks and provides a number of classes, like Gimp::Image and Gimp::Palette that allow shorter identifiers to be used (all these appear with the Gimp:: prefix as well as without, i.e. Gimp::Palette is the same class as Palette).

If you call a method, Gimp tries to find a gimp function by prepending a number of prefixes until it finds a valid function:

$image = Gimp->image_new(...); # calls gimp_image_new(...)
$image = Image->new(...); # calls gimp_image_new as well
$image = new Image(...); # the same in green
Palette->set_foreground(...) # calls gimp_palette_set_foreground(..)

Return values from functions are automatically blessed (through The Magic Autobless feature ;) to their corresponding classes, i.e.

$image = new Image(...); # $image is now blessed to Gimp::Image
$image->height; # calls gimp_image_height($image)
$image->flatten; # likewise gimp_flatten($image)
$image->histogram(...); # calls gimp_histogram($image,...), since
# gimp_image_histogram does not exist
The class argument ($image in the above examples) is prepended to the argument list.

Another shortcut: many functions want a (redundant) image argument, like

$image->shear ($layer, ...)

Since all you want is to shear the $layer, not the $image, this is confusing as well. In cases like this, Gimp allows you to write:

$layer->shear (...)

And automatically infers the additional IMAGE-type argument.

As the (currently) last goodie, if the first argument is of type INT32, its name is "run_mode" and there are no other ambiguties, you can omit it, i.e. these three calls are equivalent:

plug_in_gauss_rle (RUN_NONINTERACTIVE, $image, $layer, 8, 1, 1);
plug_in_gauss_rle ($image, $layer, 8, 1, 1);
plug_in_gauss_rle ($layer, 8, 1, 1);

You can call all sorts of sensible and not-so-sensible functions, so this feature can be abused:

patterns_list Image; # will call gimp_patterns_list
quit Plugin; # will quit the Gimp, not an Plugin.

there is no image involved here whatsoever...

Requirements:
  • Perl
    tags gimp image  image new  calls gimp  image image  gimp palette  palette set  you can  new image  gauss rle  set foreground  image height  image histogram  image layer  

    Download Gimp::OO 1.211


     http://ftp.casaafacerilor.ro/mirrors/CPAN/authors/id/M/ML/MLEHMANN/Gimp-1.211.tar.gz


    Authors software

    Crossfire+ 2006-09-17 (by Marc Lehmann)
    Its main purpose, besides being fun to play, is to demo the specific versions of the server, archetypes and maps used by crossfire+

    LibLZF 1.51 (by Marc Lehmann)
    LibLZF is a very small data compression library

    PDL::Audio 1.1 (by Marc Lehmann)
    PDL::Audio is a Perl module for some PDL functions intended for audio processing.

    SYNOPSIS

    use PDL;
    use PDL::Audio;

    Oh

    Gimp::basewidget 1.211 (by Marc Lehmann)
    Gimp::basewidget is a pragma to declare the superclass of a gtk widget.

    SYNOPSIS

    use Gimp::basewidget 'superclass';
    e.g.

    Gimp::Feature 1.211 (by Marc Lehmann)
    Gimp::Feature is a Perl module that can check for specific features to be present before registering the script.

    SYNOPSIS

    use


    Similar software

    Gimp::OO 1.211 (by Marc Lehmann)
    Gimp::OO is a Perl module with pseudo-OO for Gimp functions.

    SYNOPSIS

    use Gimp; # Gimp::OO is now part of Gimp.

    Gimp::Util 1.211 (by Marc Lehmann)
    Gimp::Util is a Perl module to some handy routines for Gimp-Perl users.

    SYNOPSIS

    use Gimp;
    use Gimp::Util;

    Gimp-Perl is n

    Formulas Rendering Plug-In for the Gimp 2 0.9.7 (by Nicolas Benoit)
    Formulas Rendering Plug-In for the Gimp 2 is a simple plugin that allows you to change the values of each color channel of each pixel

    The layer extract plug-in (by Reinhard Geisler)
    The layer extract plug-in is a Gimp plug-in that creates a new image/film by periodically extracting layers from another image.

    It

    GIMP Animation Package 2.2.1 (by The GIMP Team)
    GIMP Animation Package is a collection of Plug-Ins to extend the GIMP with capabilities to edit and create Animations as sequences of

    SGI RGB Image File Plug-In 1.1.1 (by Michael Sweet)
    SGI plug-in provides SGI image file load & save modules for The GIMP

    The streak plug-in (by Reinhard Geisler)
    The streak plug-in is a Gimp plug-in that makes simulation of a streak camera.

    A streak camera images an object through a slit - t

    Animated rotation 1 (by COUTIER)
    Animated rotation is a GIMP plugin that can build an new animated image by rotation of a layer

    Gimp::Fu 1.211 (by Marc Lehmann)
    Gimp::Fu is a "easy to use" framework for Gimp scripts.

    SYNOPSIS

    use Gimp;
    use Gimp::Fu;

    (this module uses Gtk, so ma

    Gimp::Compat 1.211 (by Dov Grobgeld)
    Gimp::Compat is a Perl module with compatibility functions for older versions of Gimp.

    SYNOPSIS

    < loaded automatically on dema


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags