diff --git a/ChangeLog b/ChangeLog index ab24e4aa9e..53e322f942 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-11-24 Tuomas Kuosmanen + + * 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 * app/preferences_dialog.c: be more instructive about the diff --git a/plug-ins/perl/examples/perlotine b/plug-ins/perl/examples/perlotine index 92bc01d216..5005c70f95 100755 --- a/plug-ins/perl/examples/perlotine +++ b/plug-ins/perl/examples/perlotine @@ -1,4 +1,7 @@ #!/usr/bin/perl + +eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # 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 @@ -8,6 +11,12 @@ # # Bruce Miller (fixed to accomdate 1.1.x changes) # Brendon and Wendy Humphrey (progress bar, nice comments) +# +# Tuomas Kuosmanen +# 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! @@ -28,7 +37,7 @@ sub get_vguides { $i=0; my @vguides; 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)); $vkeys{$keyval} = $i; } @@ -49,7 +58,7 @@ sub get_hguides { $i=0; my @hguides; 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)); $hkeys{$keyval} = $i; } @@ -73,9 +82,12 @@ sub dosel { # print "Cropping from $l to $r, $t to $b\n"; $tmpimg->crop($r-$l, $b-$t, $l, $t); $tmplay = $tmpimg->active_drawable; - if (! $tmplay->indexed) { - $tmpimg->convert_indexed(1,256); - } + if (! $tmplay->is_indexed) { + # 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->delete; return "$imgpath$imgname"; # what I want printed in html