mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 08:17:40 +00:00
Fixed perlotine, works again now. (Some changes to function parameters
seemed to happen? Also guide orientation type names changed..) /tigert
This commit is contained in:
parent
947899f63b
commit
fe3eed8ef5
|
@ -1,3 +1,11 @@
|
||||||
|
1999-11-24 Tuomas Kuosmanen <tigert@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/perl/examples/perlotine: Fixed some changed stuff,
|
||||||
|
mostly gimp_image_get_guide_orientation()'s types (from
|
||||||
|
GUIDE_HORIZONTAL to HORIZONTAL (and vertical respectively). Also
|
||||||
|
changed the image->convert_indexed() call and parameters that were
|
||||||
|
wrong.
|
||||||
|
|
||||||
Wed Nov 24 01:23:34 MET 1999 Sven Neumann <sven@gimp.org>
|
Wed Nov 24 01:23:34 MET 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/preferences_dialog.c: be more instructive about the
|
* app/preferences_dialog.c: be more instructive about the
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
|
||||||
|
if 0; # not running under some shell
|
||||||
# <sjburges@gimp.org>
|
# <sjburges@gimp.org>
|
||||||
# This is tigert's request. I suppose it'll be useful to those that do
|
# This is tigert's request. I suppose it'll be useful to those that do
|
||||||
# this sort of thing. Personally I'll probably only run it to test and
|
# this sort of thing. Personally I'll probably only run it to test and
|
||||||
|
@ -9,6 +12,12 @@
|
||||||
# Bruce Miller (fixed to accomdate 1.1.x changes)
|
# Bruce Miller (fixed to accomdate 1.1.x changes)
|
||||||
# Brendon and Wendy Humphrey <brendy@swipnet.se> (progress bar, nice comments)
|
# Brendon and Wendy Humphrey <brendy@swipnet.se> (progress bar, nice comments)
|
||||||
#
|
#
|
||||||
|
# Tuomas Kuosmanen <tigert@gimp.org>
|
||||||
|
# Fixed some things to make this work with cvs gimp. Fixed calls to
|
||||||
|
# gimp_get_guide_orientation() (guide types that changed from
|
||||||
|
# GUIDE_VERTICAL to VERTICAL and horizontal, respectively. Should
|
||||||
|
# work now). Also convert to indexed parameters changed, fixed them too.
|
||||||
|
#
|
||||||
# If you have more additions, etc please don't hesitate to send them in!
|
# If you have more additions, etc please don't hesitate to send them in!
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +37,7 @@ sub get_vguides {
|
||||||
$i=0;
|
$i=0;
|
||||||
my @vguides;
|
my @vguides;
|
||||||
while ($i=$img->find_next_guide($i)) {
|
while ($i=$img->find_next_guide($i)) {
|
||||||
if ($img->get_guide_orientation($i) == &Gimp::VERTICAL_GUIDE){
|
if ($img->get_guide_orientation($i) == &Gimp::VERTICAL){
|
||||||
$keyval = sprintf("%4d", $img->get_guide_position($i));
|
$keyval = sprintf("%4d", $img->get_guide_position($i));
|
||||||
$vkeys{$keyval} = $i;
|
$vkeys{$keyval} = $i;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +58,7 @@ sub get_hguides {
|
||||||
$i=0;
|
$i=0;
|
||||||
my @hguides;
|
my @hguides;
|
||||||
while ($i=$img->find_next_guide($i)) {
|
while ($i=$img->find_next_guide($i)) {
|
||||||
if ($img->get_guide_orientation($i) == &Gimp::HORIZONTAL_GUIDE){
|
if ($img->get_guide_orientation($i) == &Gimp::HORIZONTAL){
|
||||||
$keyval = sprintf("%4d", $img->get_guide_position($i));
|
$keyval = sprintf("%4d", $img->get_guide_position($i));
|
||||||
$hkeys{$keyval} = $i;
|
$hkeys{$keyval} = $i;
|
||||||
}
|
}
|
||||||
|
@ -73,8 +82,11 @@ sub dosel {
|
||||||
# print "Cropping from $l to $r, $t to $b\n";
|
# print "Cropping from $l to $r, $t to $b\n";
|
||||||
$tmpimg->crop($r-$l, $b-$t, $l, $t);
|
$tmpimg->crop($r-$l, $b-$t, $l, $t);
|
||||||
$tmplay = $tmpimg->active_drawable;
|
$tmplay = $tmpimg->active_drawable;
|
||||||
if (! $tmplay->indexed) {
|
if (! $tmplay->is_indexed) {
|
||||||
$tmpimg->convert_indexed(1,256);
|
# do this: fs/low-bleed dither, make palette, 256 colors,
|
||||||
|
# dont dither alpha, do remove unused (is 1 "true" here?),
|
||||||
|
# custom palette is ignored (we create our own, thus "duck" works).
|
||||||
|
$tmpimg->convert_indexed (2,0,256,0,1,duck)
|
||||||
}
|
}
|
||||||
$tmpimg->gimp_file_save(-1,"$savepath$imgpath$imgname","$savepath$imgpath$imgname");
|
$tmpimg->gimp_file_save(-1,"$savepath$imgpath$imgname","$savepath$imgpath$imgname");
|
||||||
$tmpimg->delete;
|
$tmpimg->delete;
|
||||||
|
|
Loading…
Reference in a new issue