![]() This will overwrite your AUTOLOAD function, if you have one. Import constants as above, as well as all libgimp and PDB functions automagically into the caller's namespace. Set default spawn options to options, see Gimp::Net. The connection is made when Gimp::import is called, after Gimp has been compiled - so don't put use Gimp () spawn_options= options It is important that Gimp be able to connect to an instance of GIMP one way or another: otherwise, it will not be able to load the various constants on which modules rely. If this is not specified, Gimp will try various options, falling back to spawn which starts a new GIMP instance. See "ENVIRONMENT" in Gimp::Net for other possibilities. Possible options include spawn/gui or unix/path/to/socket. The technical reason for this change is that when Gimp.pm loads, it must connect to GIMP to load its constants, like PDB_INT32. Previous versions of this package required a call to Gimp::init. This is how to use Gimp-Perl in "net mode". Import constants for plugin parameter types (PDB_INT32, PDB_STRING etc.) only. :constsĪll constants found by querying GIMP (BG_IMAGE_FILL, RUN_NONINTERACTIVE, LAYER_MODE_NORMAL_LEGACY, PDB_INT32 etc.). Place these in your use Gimp qw(.) command to have added features available to your plug-in. Over 50 example scripts to give you a good starting point, or use out of the box. In the latter case, Gimp::Fu can either connect to a GIMP already running, or start up its own.Īccess the pixel-data functions using PDL (see Gimp::PixelRgn) giving the same level of control as a C plug-in, with a data language wrapper. Scripts that use Gimp::Fu can be accessed seamlessly either from GIMP's menus, other scripting interfaces like Script-Fu, or from the command line (execute the plugin with the -help flag for more information). Program with either a fully object-oriented syntax, or a (deprecated) plain PDB (scheme-like) interface. You'll thank me in time.Īccess to GIMP's Procedural Database (PDB) for manipulation of most objects. Be warned Gimp-Perl does not allow use of deprecated GIMP procedures. For referencing functions you already know of, the included script gimpdoc is useful. Using the Help/Procedure Browser is a good way to learn GIMP's Procedural Database (PDB). Lots of other examples are in the examples/ directory of your gimp-perl source tree, some of which will be installed in your plug-ins directory if you are running from a package. If you do need a custom interface, see examples/example-no-fu - although Gimp::Fu does also offer custom widgets, see the same script using Gimp::Fu in examples/fade-alpha. To jump straight into how to write GIMP plugins, see Gimp::Fu: it is recommended for scripts not requiring custom interfaces or specialized execution. It is not compatible with version 2.6 or below of GIMP. This is a release of Gimp-Perl for gimp-2.8. It is developed on Linux, and should work with similar OSes. It can be used to automate repetitive tasks, achieve a precision hard to get through manual use of GIMP, interface to a web server, or other tasks that involve GIMP. Gimp-Perl is a module for writing plug-ins, extensions, standalone scripts, and file-handlers for the GNU Image Manipulation Program (GIMP). My $image = new Gimp::Image (600, 300, RGB) Ħ00,300,RGB_IMAGE,"Background",100,LAYER_MODE_NORMAL_LEGACYĮxample_function - Short description of the function Use Gimp::Fu # easy scripting environment Gimp - Write GIMP extensions/plug-ins/load- and save-handlers in Perl SYNOPSIS use Gimp gimp_tile_*, gimp_pixel_rgn_*, gimp_drawable_get.Gimp::register_callback(gimp_function_name, perl_function).$parasite = Gimp::Parasite->new($name, $flags, $data).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |