[LON-CAPA-cvs] cvs: loncom /homework randomlylabel.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 13 Nov 2002 23:52:41 -0000
albertel Wed Nov 13 18:52:41 2002 EDT
Modified files:
/loncom/homework randomlylabel.pm
Log:
- Fixes BUG#947
- labels and images are placed correctly now.
Index: loncom/homework/randomlylabel.pm
diff -u loncom/homework/randomlylabel.pm:1.1 loncom/homework/randomlylabel.pm:1.2
--- loncom/homework/randomlylabel.pm:1.1 Fri Nov 8 09:37:42 2002
+++ loncom/homework/randomlylabel.pm Wed Nov 13 18:52:41 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# randomlabel.png: composite together text and images into 1 image
#
-# $Id: randomlylabel.pm,v 1.1 2002/11/08 14:37:42 albertel Exp $
+# $Id: randomlylabel.pm,v 1.2 2002/11/13 23:52:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -49,13 +49,15 @@
my $subimage = Image::Magick->new;
$subimage->Read('filename' => $ENV{"form.IMG$i"});
$image->Composite('x' => $ENV{"form.X$i"},'y' => $ENV{"form.Y$i"},
- 'compose'=> 'Over', 'image' => $subimage);
+ 'compose'=> 'Over', 'image' => $subimage,
+ 'gravity' => 'NorthWest');
undef($subimage);
}
for(my $i=0;$i<$ENV{"form.COUNT"};$i++) {
$image->Annotate('text' => $ENV{"form.LB$i"},'x' => $ENV{"form.X$i"},
'y' => $ENV{"form.Y$i"}, 'font' => 'Times-Bold',
- 'pointsize' => 18, 'antialias' => 'true');
+ 'pointsize' => 18, 'antialias' => 'true',
+ 'gravity' => 'NorthWest');
}
$image->Set('magick'=>'png');
my @blobs=$image->ImageToBlob();