see plug-ins/perl/Changes
This commit is contained in:
@ -23,7 +23,10 @@ Revision history for Gimp-Perl extension.
|
||||
them without knowing.
|
||||
- updated examples/xachvision.
|
||||
- make configuration more paranoid (break with standalone build rather
|
||||
than inside the gimp)
|
||||
than inside the gimp).
|
||||
- docfix by Alexander Kurz.
|
||||
- save_image now saves png again (reported by Michael Guntsche).
|
||||
- perlotine updated (poatch by Michael Guntsche).
|
||||
|
||||
1.201 Thu Aug 24 23:44:43 CEST 2000
|
||||
** LAST VERSION THAT WORKS WITH 1.0 **
|
||||
|
||||
@ -837,7 +837,7 @@ sub save_image($$) {
|
||||
my($interlace,$flatten,$quality,$type,$smooth,$compress,$loop,$dispose);
|
||||
|
||||
$interlace=0;
|
||||
$quality=0.75;
|
||||
$quality=75;
|
||||
$smooth=0;
|
||||
$compress=7;
|
||||
$loop=0;
|
||||
@ -877,7 +877,7 @@ sub save_image($$) {
|
||||
}
|
||||
$layer->file_gif_save($path,$path,$interlace,$loop,$delay,$dispose);
|
||||
} elsif ($type eq "PNG") {
|
||||
$layer->file_png_save($path,$path,$interlace,$noextra,$compress);
|
||||
$layer->file_png_save($path,$path,$interlace,$compress,(!$noextra) x 5);
|
||||
} elsif ($type eq "PNM") {
|
||||
$layer->file_pnm_save($path,$path,1);
|
||||
} else {
|
||||
|
||||
@ -14,7 +14,7 @@ embedxpm - embed xpm pictures into perl source
|
||||
|
||||
embedxpm can be used to embed xpm pictures directly into a perl program. To
|
||||
do this, your program source has to contain some markers (in the form of
|
||||
ocmments) that describe the position where the picture should be inserted.
|
||||
comments) that describe the position where the picture should be inserted.
|
||||
To only insert the xpm data, use this form:
|
||||
|
||||
#%XPM:<name of xpm>%
|
||||
|
||||
@ -84,20 +84,13 @@ sub get_hguides {
|
||||
#
|
||||
|
||||
sub dosel {
|
||||
($img, $savepath, $imgpath, $imgbasename, $l,$r,$t,$b, $i,$j) = @_;
|
||||
($img, $savepath, $imgpath, $imgbasename, $extension, $l,$r,$t,$b, $i,$j) = @_;
|
||||
$filename =~ m/^(.*)\.[^\.]*$/ ;
|
||||
$imgname = "$imgbasename-$i-$j.gif";
|
||||
$imgname = "$imgbasename-$i-$j.$extension";
|
||||
$tmpimg = $img->channel_ops_duplicate;
|
||||
# print "Cropping from $l to $r, $t to $b\n";
|
||||
$tmpimg->crop($r-$l, $b-$t, $l, $t);
|
||||
$tmplay = $tmpimg->active_drawable;
|
||||
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->Gimp::Fu::save_image("$savepath$imgpath$imgname","$savepath$imgpath$imgname");
|
||||
$tmpimg->delete;
|
||||
return "$imgpath$imgname"; # what I want printed in html
|
||||
}
|
||||
@ -161,13 +154,14 @@ register "perlotine",
|
||||
[PF_STRING, "save_path", "The path to export the HTML to",$ENV{HOME}],
|
||||
[PF_STRING, "html_file_name", "Filename to export","perlotine.html"],
|
||||
[PF_STRING, "image_basename", "What to call the images","perlotine"],
|
||||
[PF_RADIO, "image_extension", "The format of the images: {gif, jpg, png}", "gif", [gif => "gif", jpg => "jpg", png => "png"]],
|
||||
[PF_TOGGLE, "separate_image_dir", "Use a separate directory for images?",0],
|
||||
[PF_STRING, "relative_image_path", "The path to export the images to, relative to the Save Path", "images/"],
|
||||
[PF_TOGGLE, "capitalize_tags", "Capatalize HTML tags?", 0],
|
||||
[PF_SPINNER, "cellspacing", "Add space between the table elements", 0, [0,15,1]],
|
||||
], sub {
|
||||
|
||||
my($img,$layer,$savepath, $htmlname, $imgbasename, $separate, $imgpath, $capatalize, $cellspacing) =@_;
|
||||
my($img,$layer,$savepath, $htmlname, $imgbasename, $extension, $separate, $imgpath, $capatalize, $cellspacing) =@_;
|
||||
|
||||
@vert = get_vguides($img);
|
||||
@horz = get_hguides($img);
|
||||
@ -219,7 +213,7 @@ register "perlotine",
|
||||
$left=0;
|
||||
for ($j=0; $j<=scalar(@vert); $j++) {
|
||||
$right = ($j>$#vert) ? $img->width : $img->get_guide_position($vert[$j]);
|
||||
$imgname = dosel($img, $savepath, $imgpath, $imgbasename, $left, $right, $top, $bot, $i, $j);
|
||||
$imgname = dosel($img, $savepath, $imgpath, $imgbasename, $extension, $left, $right, $top, $bot, $i, $j);
|
||||
html_table_entry(\*FILE, $imgname, $right-$left, $bot-$top, $capatalize);
|
||||
$left = $right + $cellspacing;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user