Re: perlotine

2001-02-13 Thread Jeff Sheffield



 Indira, -- wrote
 You have to make sure that you have all the Perl/PDL stuff set up.
Indira is correct... however to elevate confusion... what she is
 talking about is gimp-perl. I.E. the perlotine script is 
a gimp-perl script.
it uses 
use Gimp;
use Gimp::Fu;
use Gimp::Util;
perl modules which you can get from here 
see
http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?filetype=%20distribution%20name%20or%20description;join=and;arrange=file;download=auto;stem=no;case=clike;site=ftp.funet.fi;age=;distinfo=919


Jeff

On Tue, Feb 13, 2001 at 02:32:25AM +0100, Guillermo S. Romero / Familia Romero wrote:
 [EMAIL PROTECTED] (2001-02-12 at 2016.25 -0500):
  The perl scripts only show up when configure is certain that you have
  the PDL and it knows where it is.  I would run configure again and watch
  it.  My 1.2.1 has it.  I'll bet that this is your problem.
 
 I do not have PDL, I have Perlotine. You can have Perl without some
 extensions, you just get less plugins.
 
 GSR
  
Thanks, 
Jeff

-
| There is no reason for any individual to have a computer in their home.   |
| ( Ken Olson, President of DEC, World Future Society Convention, 1977 )|
-
| Jeff Sheffield|
| [EMAIL PROTECTED] AIM=JeffShef ICQ=4340529   |
| Gocho Networks http://gocho.net (day gig) |
-



Re: perlotine

2001-02-13 Thread Carol Spears

I just checked my source just to make sure -- I haven't had to install
the gimp-perl package since 1.1.29 (actually 1.1.24, but I was never
able to get it to work).  

All of the Gimp Perl stuff comes with the package now.  When I got the
PDL (I was installing in a brand new distribution installation) I got
the PDL and that ResDe---nt doey and all of my perl configuration and
make errors went away and I had a working perlotine and center guide,
etc.

I would like to know how to install all of this without the PDL as my
space is somewhat limited.

Jeff Sheffield wrote:
 
 
 
  Indira, -- wrote
  You have to make sure that you have all the Perl/PDL stuff set up.
 Indira is correct... however to elevate confusion... what she is
  talking about is gimp-perl. I.E. the perlotine script is
 a gimp-perl script.
 it uses
 use Gimp;
 use Gimp::Fu;
 use Gimp::Util;
 perl modules which you can get from here
 see
 
http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?filetype=%20distribution%20name%20or%20description;join=and;arrange=file;download=auto;stem=no;case=clike;site=ftp.funet.fi;age=;distinfo=919
 
 Jeff
 
 On Tue, Feb 13, 2001 at 02:32:25AM +0100, Guillermo S. Romero / Familia Romero wrote:
  [EMAIL PROTECTED] (2001-02-12 at 2016.25 -0500):
   The perl scripts only show up when configure is certain that you have
   the PDL and it knows where it is.  I would run configure again and watch
   it.  My 1.2.1 has it.  I'll bet that this is your problem.
 
  I do not have PDL, I have Perlotine. You can have Perl without some
  extensions, you just get less plugins.
 
  GSR
 
 Thanks,
 Jeff
 
 -
 | There is no reason for any individual to have a computer in their home.   |
 | ( Ken Olson, President of DEC, World Future Society Convention, 1977 )|
 -
 | Jeff Sheffield|
 | [EMAIL PROTECTED] AIM=JeffShef ICQ=4340529   |
 | Gocho Networks http://gocho.net (day gig) |
 -



Re: perlotine

2001-02-13 Thread Marc Lehmann

On Tue, Feb 13, 2001 at 12:53:44PM -0500, Carol Spears [EMAIL PROTECTED] wrote:
 I would like to know how to install all of this without the PDL as my
 space is somewhat limited.

The official answer is "just do it", i.e. perlotine does not depend on PDL
and will be installed even when PDL is not present (however, semi-present
PDL installations, e.g. binaries but no header files, cuase the build to
fail of course).

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



perlotine

2001-02-12 Thread Indira

hello,
I use freebsd 4.2 as an operating system and I upgraded to gimp-1.2.1.
I have used filter-web-perlotine to slice up my images before. But looks
like perlotine is missing from Gimp1.2. Is this permanent?
Thanks
Indira

There is nothing good or bad, but thinking makes it so...





Re: perlotine

2001-02-12 Thread Amy

Indira,

You have to make sure that you have all the Perl/PDL stuff set up.  I
don't believe it's default.

--Ames
**
  Amy L. Turner   [EMAIL PROTECTED]

  "If you remain calm, you just don't have all the facts..." 
**


On Mon, 12 Feb 2001, Indira wrote:

 hello,
 I use freebsd 4.2 as an operating system and I upgraded to gimp-1.2.1.
 I have used filter-web-perlotine to slice up my images before. But looks
 like perlotine is missing from Gimp1.2. Is this permanent?
 Thanks
 Indira
 
 There is nothing good or bad, but thinking makes it so...
 
 
 





Re: perlotine

2001-02-12 Thread Carol Spears

Indira wrote:
 
 hello,
 I use freebsd 4.2 as an operating system and I upgraded to gimp-1.2.1.
 I have used filter-web-perlotine to slice up my images before. But looks
 like perlotine is missing from Gimp1.2. Is this permanent?
 Thanks
 Indira
 
 There is nothing good or bad, but thinking makes it so...

The perl scripts only show up when configure is certain that you have
the PDL and it knows where it is.  I would run configure again and watch
it.  My 1.2.1 has it.  I'll bet that this is your problem.



Perlotine

2000-04-22 Thread Axel Rousseau

Hi all,
I send you the version from the perlotine script to slice image in
jpeg/png/gif format.
It's not mine, I've just add the jpeg.
If you find somes bugs, please contact me.
Thank you

Axel R.

#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
if 0; # not running under some shell

# [EMAIL PROTECTED]
# 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
# put up a demo image.

# Since updated a couple times by others, and intgrated by me:
# 
# Bruce Miller  (fixed to accomdate 1.1.x changes)
# Brendon and Wendy Humphrey [EMAIL PROTECTED] (progress bar, nice comments)
#
# Tuomas Kuosmanen [EMAIL PROTECTED]
# 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.
#
# [EMAIL PROTECTED] 
# Added changes to make progess bar work for images with only horizontal
# or vertical guides.  This was fixed at one time, I forget who did that.
# Somehow it got broke again ;(
#
# Added File::Path; for making the directory if it doesn't already exist.
#
# PNG and JPEG format added by [EMAIL PROTECTED]
#
# If you have more additions, etc please don't hesitate to send them in!

use File::Path;

use Gimp qw(:auto);
use Gimp;
use Gimp::Fu;
use Gimp::Util;


# Uncomment if you want to see everything that's going on.
# Gimp::set_trace(TRACE_ALL);

#
# Generates an ordered list of all existing vertical guides.
#
 
sub get_vguides {  
my ($img)=@_;
$i=0;
my @vguides;
while ($i=$img-find_next_guide($i)) {
if ($img-get_guide_orientation($i) == Gimp::VERTICAL){
$keyval = sprintf("%4d", $img-get_guide_position($i));
$vkeys{$keyval} = $i;
}
}
foreach $key(sort (keys %vkeys)) {
push @vguides, $vkeys{$key};
}
return @vguides;
}

#
# Generates an ordered list of all existing horizontal guides.
#

sub get_hguides { 
my ($img)=@_;
$i=0;
my @hguides;
while ($i=$img-find_next_guide($i)) {
if ($img-get_guide_orientation($i) == Gimp::HORIZONTAL){
$keyval = sprintf("%4d", $img-get_guide_position($i));
$hkeys{$keyval} = $i;
}
}
# need to sort them in order of their occurance in the image
foreach $key(sort keys %hkeys) {
push @hguides, $hkeys{$key};
}
return @hguides;
}

#
# Duplicate, crop and save the image fragment.
#

sub dosel { 
($img, $savepath, $imgpath, $imgbasename, $imgformat, $l,$r,$t,$b, $i,$j) = @_;
$filename =~ m/^(.*)\.[^\.]*$/ ;
$imgname = "$imgbasename-$i-$j.$imgformat";
$tmpimg = $img-channel_ops_duplicate;
$tmpimg-crop($r-$l, $b-$t, $l, $t);
$tmplay = $tmpimg-active_drawable;
if ($imgformat eq "gif") {
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(NON_INTERACTIVE,"$savepath$imgpath$imgname","$savepath$imgpath$imgname");
} elsif ($imgformat eq "jpg") {
# some default options for the jpeg format :
$tmplay-file_jpeg_save(("$savepath$imgpath$imgname")x2, 0.7, 0, 1, 0, 
"", 0, 1, 0, 0)
} elsif ($imgformat eq "png" ) {
# same question for png

file_png_save(RUN_NONINTERACTIVE,$tmpimg,$tmplay,"$savepath$imgpath$imgname","$savepath$imgpath$imgname",0,0,9);
} else { print "unknown format\n";}

$tmpimg-delete;
return "$imgpath$imgname"; # what I want printed in html
}

#
# HTML Table Generation Functions
#

sub html_table_start {
($fn,$cellpadding,$cellspacing,$border,$capatalize) = @_;
$str = $capatalize ? 
"TABLE CELLSPACING=$cellspacing CELLPADDING=$cellpadding BORDER=$border\n" :
"table cellspacing=$cellspacing cellpadding=$cellpadding border=$border\n" ;
print $fn $str;
}

sub html_table_row_start {
($fn, $capatalize) = @_;
$str = $capatalize ? "\tTR\n" : "\ttr\n";
print $fn $str;
}

sub html_table_entry {
($fn, $imgname, $width, $height, $capatalize) = @_;
$str = $capatalize ? 
"\t\tTDIMG ALT=\" \" SRC=\"$imgname\" WIDTH=\"$width\" HEIGHT=\"$height\"/TD\n" :
"\t\ttdimg alt=\" \" src=\"$imgname\" width=\"$width\&