• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-May-2022-10,3865,784

lib/H11-Apr-2019-16,6989,219

po/H11-Apr-2019-33,33024,699

t/H11-Apr-2019-1,162973

utils/H11-Apr-2019-1,4561,000

AUTHORSH A D11-Apr-2019187 85

COPYINGH A D11-Apr-2019440 107

COPYING.ArtisticH A D11-Apr-20196 KiB13299

COPYING.GNUH A D11-Apr-201917.6 KiB341281

ChangesH A D11-Apr-201982.8 KiB1,9321,718

MAINTAINERSH A D11-Apr-2019172 118

MANIFESTH A D11-Apr-20192.5 KiB154153

META.jsonH A D11-Apr-20191.9 KiB7877

META.ymlH A D11-Apr-20191 KiB5150

Makefile.PLH A D11-Apr-20192 KiB8674

READMEH A D11-Apr-20195.5 KiB177132

README.win32H A D11-Apr-20193.1 KiB5741

TODOH A D11-Apr-20191.5 KiB2928

pxgettextH A D11-Apr-20191.1 KiB5136

typemapH A D11-Apr-20193 KiB154122

README

1NAME
2
3       Gimp-Perl allows GIMP extensions/plug-ins/load & save handlers in Perl.
4
5SYNOPSIS
6
7         use Gimp;
8         use Gimp::Fu;
9         podregister {
10           # your code
11	   my $image = new Gimp::Image (600, 300, RGB);
12	   my $bg = $image->layer_new(
13	     600,300,RGB_IMAGE,"Background",100,NORMAL_MODE
14	   );
15	   $image->insert_layer($bg, 1, 0);
16	   $image->edit_fill($bg, FOREGROUND_FILL);
17	   Gimp::Display->new($image);
18	   $image;
19         };
20         exit main;
21         __END__
22         =head1 NAME
23
24         example_function - Short description of the function
25
26         =head1 SYNOPSIS
27
28         <Image>/File/Create/Patterns/Example...
29
30         =head1 DESCRIPTION
31
32         Longer description of the function...
33
34       See the end of this document for a complete example script.
35
36PREREQUISITES
37
38       Perl: 5.14+
39       The GNU Image Manipulation Program (GIMP): 2.8 (pref 2.8.10)
40	 http://www.gimp.org/
41	 ftp://ftp.gimp.org/pub/gimp/
42       Gtk2, the perl extension for gtk+2, "gtk2-perl-xs" variant
43	 http://gtk2-perl.sourceforge.net
44       PDL, the Perl Data Language: 2.0+ (2.004+ recommended)
45	 http://www.cpan.org/
46       Other packages: use CPAN to install this one, and it will get these too.
47
48INSTALLATION
49
50       On Unix/Linux, you should be able to:
51	  perl ./Makefile.PL && make test && make install
52       To get a listing of configuration options, enter:
53	  perl ./Makefile.PL --help
54
55       After installation, these perl plug-ins should be visible from
56       within the Gimp (and many, many more):
57
58	   Filters/Perl/Server
59	   Filters/Artistic/Windify
60	   Filters/Misc/Prepare for GIF
61	   Filters/Misc/Webify
62
63       If you wish to install the plugins in your personal GIMP directory
64       instead of the system-wide one (e.g. if you don't have root
65       access), install instead using this:
66	  make install GTINSTALL='gimptool-2.0 --install-bin'
67
68       To override other build or install options see ExtUtils::MakeMaker docs.
69
70       To build a slp/deb/rpm/whatever package use the normal prefix,
71       and override prefix at "make install" time (lowercase for GIMP,
72       upper for perl):
73          make prefix=`pwd`/debian/tmp/usr PREFIX=`pwd`/debian/tmp/usr install
74
75SUPPORT/MAILING LISTS/MORE INFO
76
77       Please report any problems:
78	  http://bugzilla.gnome.org/browse.cgi?product=gimp-perl
79	  https://rt.cpan.org/Dist/Display.html?Name=Gimp
80
81       Homepages: https://git.gnome.org/browse/gimp-perl/
82		  http://search.cpan.org/dist/Gimp/
83       Currently-suggested mailing list: gimp-user
84	  (see http://www.gimp.org/mail_lists.html)
85       New releases will be announced to gimp-announce.
86
87       You can also upload your scripts to the gimp registry at
88	  http://registry.gimp.org/
89
90       If you want to play along at home with git:
91	  git://git.gnome.org/gimp-perl
92
93EXAMPLE PERL PLUG-IN
94
95       Here is a complete plug-in, examples/example-fu:
96
97#!/usr/bin/perl
98
99use strict;
100use Gimp;
101use Gimp::Fu;
102
103podregister {
104  # no input parameters line - source filter inserts. See Gimp::Fu docs.
105  $Gimp::verbose = 1; # remove this to stop debugging output
106  Gimp::Context->push; # store current settings, so present ones preserved
107  my $img = Gimp::Image->new($width, $height, RGB);
108  $img->undo_group_start; # so all actions can be undone in one step
109  # the __ before the string will translate it if available
110  my $l = Gimp::Layer->new($img, $width, $height, RGB, __"Background", 100, NORMAL_MODE);
111  $l->insert_layer(0, 0); # required!
112  # now a few syntax examples
113  Gimp::Context->set_foreground($text_colour) unless $ignore_cols;
114  Gimp::Context->set_background($bg_colour) unless $ignore_cols;
115  fill $l BACKGROUND_FILL;
116  my $text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, 10, PIXELS, $font);
117  Gimp::Context->set_foreground("green");
118  $img->undo_group_end; # close the undo group
119  Gimp::Context->pop; # restore original context
120  Gimp::Display->new($img);
121  $img; # return image, as Gimp::Fu added that to our output parameters
122        # because no-image-input
123};
124
125exit main;
126__END__
127
128=head1 NAME
129
130example_script - Gimp::Fu example, mostly non-functional
131
132=head1 SYNOPSIS
133
134<Image>/Filters/Languages/_Perl/_Test/Dialog
135
136=head1 DESCRIPTION
137
138Just a starting point to derive new scripts. Always remember to put a
139descriptive help message here!
140
141=head1 PARAMETERS
142
143  # one of each type of parameter here
144  # argument type, variable name, short description, default, extra arguments
145  [PF_SLIDER	, "width"	, "Image width"		, 360, [300, 500]],
146  [PF_SPINNER	, "height"	, "Image height"	, 100, [100, 200]],
147  [PF_STRING	, "text"	, "Message"		, "example text"],
148  [PF_TEXT	, "longtext"	, "Longer text"		, "more example text"],
149  [PF_FILE	, "file"	, "File"		, "/tmp"],
150  [PF_INT8	, "int8"	, "8-bit int"		, 10],
151  [PF_INT32	, "bordersize"	, "Border size"		, 10],
152  [PF_FLOAT	, "borderwidth"	, "Border width"	, 1/5],
153  [PF_FONT	, "font"	, "Font"],
154  [PF_COLOUR	, "text_colour"	, "Text colour", [10,10,10]],
155  [PF_COLOUR	, "bg_colour"	, "Background colour"	, [0xff,0x80,0]],
156  [PF_TOGGLE	, "ignore_cols" , "Ignore colours"	, 0],
157  [PF_IMAGE	, "extra_image"	, "Additional picture to ignore"],
158  [PF_DRAWABLE	, "extra_draw"	, "Something to ignore as well"	],
159  [PF_RADIO	, "type"	, "Effect type"		, 0, [small => 0, large => 1]],
160  [PF_BRUSH	, "a_brush"	, "An unused brush"],
161  [PF_PATTERN	, "a_pattern"	, "An unused pattern"],
162  [PF_GRADIENT	, "a_gradients"	, "An unused gradients"],
163
164=head1 AUTHOR
165
166Marc Lehmann <pcg@goof.com>
167
168=head1 DATE
169
1702000-03-21
171
172=head1 LICENSE
173
174(c) 1998,1999,2000 Marc Lehmann
175
176Distributed under the same terms as Gimp-Perl.
177

README.win32

1very sketchy, how I (unknown who "I" is in this context; it is NOT sjburges@gimp.org) got it running:
2
3- download tml's win32 builds of everything (gtk+2 etc.)
4  http://www.gimp.org/win32
5- download cygwin, including perl5.8
6
7using Glib and Gtk2 from cvs (> 0.9)
8
9tml's libs, pkg-config etc are all unpacked under /gnuwin32. if some dlls
10are not in the bin dir, move them there:
11
12   mv /gnuwin32/lib/*.dll /gnuwin32/bin
13
14my /gnuwin32/bin looks like this:
15
16   asprintf.dll        fttimer.exe                   intl.dll                 miniunz-static.exe  msgunfmt.exe            tiffdither.exe
17   charset.dll         fttry.exe                     libatk-1.0-0.dll         miniunz.exe         msguniq.exe             tiffdump.exe
18   example-static.exe  ftview.exe                    libfontconfig-1.dll      minizip-static.exe  ngettext.exe            tiffinfo.exe
19   example.exe         gdk-pixbuf-csource.exe        libgdk-win32-2.0-0.dll   minizip.exe         pal2rgb.exe             tiffmedian.exe
20   fax2ps.exe          gdk-pixbuf-query-loaders.exe  libgdk_pixbuf-2.0-0.dll  msgattrib.exe       pango-querymodules.exe  tiffset.exe
21   fax2tiff.exe        gettext.exe                   libglib-2.0-0.dll        msgcat.exe          pkg-config.exe          tiffsplit.exe
22   fc-cache.exe        gif2tiff.exe                  libgmodule-2.0-0.dll     msgcmp.exe          ppm2tiff.exe            untgz-static.exe
23   fc-list.exe         glib-genmarshal.exe           libgobject-2.0-0.dll     msgcomm.exe         ras2tiff.exe            untgz.exe
24   freetype-6.dll      glib-gettextize               libgthread-2.0-0.dll     msgconv.exe         rgb2ycbcr.exe           xgettext.exe
25   freetype-config     glib-mkenums                  libgtk-win32-2.0-0.dll   msgen.exe           testnames.exe           xmlparse.dll
26   ftbench.exe         gobject-query.exe             libpango-1.0-0.dll       msgexec.exe         thumbnail.exe           xmltok.dll
27   ftdump.exe          gspawn-win32-helper.exe       libpangoft2-1.0-0.dll    msgfilter.exe       tiff2bw.exe             xmlwf.exe
28   ftlint.exe          gtk-demo.exe                  libpangowin32-1.0-0.dll  msgfmt.exe          tiff2ps.exe             zlib-1.dll
29   ftmemchk.exe        gtk-query-immodules-2.0.exe   libtiff.dll              msggrep.exe         tiff2rgba.exe
30   ftmulti.exe         iconv.dll                     minigzip-static.exe      msginit.exe         tiffcmp.exe
31   ftstring.exe        iconv.exe                     minigzip.exe             msgmerge.exe        tiffcp.exe
32
33(note pkg-config!)
34
35WARNING, THIS IS A BIG UNSUPPORTED HACK (just as windows itself)
36
37    PATH=/gnuwin32/bin:$PATH
38
39    cd Glib
40    perl Makefile.PL
41    make CC="gcc -mms-bitfields" LDLOADLIBS="$(pkg-config gthread-2.0 gmodule-2.0 gobject-2.0 --libs) -lintl"
42    make test
43    make install
44
45    cd Gtk2
46    perl Makefile.PL
47    make CC="gcc -mms-bitfields" LDLOADLIBS="$(pkg-config gthread-2.0 gtk+-2.0 --libs) -lintl -L/usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int/auto/Glib/ -lGlib"
48    make install
49
50    cd gimp-1.3
51    CC="gcc -mms-bitfields" ./configure --prefix=/gimp
52    make
53    make install
54
55
56
57