Looks like what I needed was
y=>150,
to move the text north by 150 pixels from bottom center so:
my $x = $image->Annotate(
undercolor=>'transparent',
font=>"myfont.ttf",
pointsize=> 48,
fill=>'black',
gravity=>'South',
y=> 150,
text=>"Page #2");
warn "$x" if $x;
Hope this helps ...
Search found 8 matches
- 2014-10-22T11:30:58-07:00
- Forum: PerlMagick
- Topic: Positioning of text with Annotate()
- Replies: 2
- Views: 12806
- 2014-10-20T10:44:19-07:00
- Forum: PerlMagick
- Topic: Positioning of text with Annotate()
- Replies: 2
- Views: 12806
Re: Positioning of text with Annotate()
I should have included the version:
$ convert --version
Version: ImageMagick 6.7.6-3 2013-10-12 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
As near as I can tell, the "translate=>" part doesn't do anything at all.
$ convert --version
Version: ImageMagick 6.7.6-3 2013-10-12 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
As near as I can tell, the "translate=>" part doesn't do anything at all.
- 2014-10-19T21:44:09-07:00
- Forum: PerlMagick
- Topic: Positioning of text with Annotate()
- Replies: 2
- Views: 12806
Positioning of text with Annotate()
I'm using Annotate() to add some text on top of an image. Things mostly work but I want the text to be about 1/2 an inch (150 pixels in my case) above the bottom edge of the image instead of right at the bottom edge. I have tried translate=> "0,150" but that didn't seem to move the text at all. Any ...
- 2014-09-13T08:59:37-07:00
- Forum: PerlMagick
- Topic: measuring string size for Annotate()
- Replies: 3
- Views: 15174
Re: measuring string size for Annotate()
This seemed to do the trick. Then I was able to scale the font, if needed, for the Annotate() call.
print "Checking label size...";
my ($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance)
= $text_back->QueryMultilineFontMetrics(
undercolor=>'white',
font=>$font_file ...
print "Checking label size...";
my ($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance)
= $text_back->QueryMultilineFontMetrics(
undercolor=>'white',
font=>$font_file ...
- 2014-09-11T13:23:30-07:00
- Forum: PerlMagick
- Topic: measuring string size for Annotate()
- Replies: 3
- Views: 15174
measuring string size for Annotate()
Is there a way to figure out if text added via Annotate() got cut off when added to a background of a fixed size? Alternatively is there a way to figure out how much room will be needed for text? I have something like the following but in some cases the string stored in $names is too big and I ...
- 2014-09-11T11:24:04-07:00
- Forum: PerlMagick
- Topic: help with transparency
- Replies: 2
- Views: 12268
Re: help with transparency
I'll answer my own question after a good bit of messing around.
The key seems to be to make the image that I want to be partially transparent a 'png' when reading it in. It is OK that the file is jpeg.
# need the png bit here
my $backimage = Image::Magick->new(magick=>'png');
my $image = Image ...
The key seems to be to make the image that I want to be partially transparent a 'png' when reading it in. It is OK that the file is jpeg.
# need the png bit here
my $backimage = Image::Magick->new(magick=>'png');
my $image = Image ...
- 2014-09-09T07:38:15-07:00
- Forum: PerlMagick
- Topic: help with transparency
- Replies: 2
- Views: 12268
help with transparency
I'm building up an image that consists of a background along with several photos arranged on top. I am getting the background with:
$imgfile = "background.jpg";
($width, $height, $size, $format) = $image->Ping($imgfile);
print "$width x $height, size = $size, format = $format\n";
$image->ReadImage ...
$imgfile = "background.jpg";
($width, $height, $size, $format) = $image->Ping($imgfile);
print "$width x $height, size = $size, format = $format\n";
$image->ReadImage ...
- 2014-09-08T19:21:21-07:00
- Forum: Users
- Topic: ImageMagick for yearbook/photo directory pages
- Replies: 1
- Views: 2727
ImageMagick for yearbook/photo directory pages
Hello,
I'm trying to decide if Image Magick is the right tool for the task I have in front of me. I'm working on compiling a photo directory (to be printed) for my church. My inputs are:
top_directory/
family1/
family2/
family3/
...
inside of each of the family* directories is a single ...
I'm trying to decide if Image Magick is the right tool for the task I have in front of me. I'm working on compiling a photo directory (to be printed) for my church. My inputs are:
top_directory/
family1/
family2/
family3/
...
inside of each of the family* directories is a single ...