Main > Programming > Libraries >

Gimp::OO 1.211

Gimp::OO 1.211

Sponsored Links

Gimp::OO 1.211 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.26 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1094
Date added: 2006-10-26
Publisher: Marc Lehmann

Gimp::OO 1.211 description

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...

Gimp::OO 1.211 Screenshot

Advertisements

Gimp::OO 1.211 Keywords

Bookmark Gimp::OO 1.211

Hyperlink code:
Link for forum:

Gimp::OO 1.211 Copyright

WareSeeker periodically updates pricing and software information of Gimp::OO 1.211 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Gimp::OO 1.211 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Gimp::Pod is a Perl module to evaluate pod documentation embedded in scripts. Free Download
Gimp::UI is a "simulation of libgimpui", and more! Free Download
Gimp::Fu is a "easy to use" framework for Gimp scripts. Free Download
Gimp::PDL is a Perl module to overwrite Tile/Region functions to work with piddles. Free Download
Gimp::Lib is an interface to libgimp (as opposed to Gimp::Net). Free Download
Gimp::Net is a communication module for the gimp-perl server. Free Download
Gimp::Compat is a Perl module with compatibility functions for older versions of Gimp. Free Download
Gimp::Config is a Perl module with config options found during configure time. Free Download