Image::Magick "geometry" atribute ??

T

Tommy Butler

Many of the methods in Image::Magick require an argument named "geometry".
The docs at http://www.imagemagick.org/www/perl.html are very vague about this.
I don't understand what the "geometry" argument is for, and I don't understand
what kind of values to assign it. It requires a syntax that I can't grasp.
Can someone enlighten me?

Example taken from the documentation:
$x = $image->Crop(geometry=>'100x100"+100"+100');

A few methods that require the "geometry" argument, as described in the docs:
+-------------------+------------------------------------------------------+
| Method | Parameters |
+===================+======================================================+
| AdaptiveThreshold | geometry=>geometry, width=>integer, height=>integer, |
| | offset=>integer |
+-------------------+------------------------------------------------------+
| Blur | geometry=>geometry, radius=>double, sigma=>double |
+-------------------+------------------------------------------------------+
| Border | geometry=>geometry, width=>integer, height=>integer, |
| | fill=>color name |
+-------------------+------------------------------------------------------+
| ColorFloodfill | geometry=>geometry, x=>integer, y=>integer, |
| | fill=>color name, bordercolor=>color name, |
| | fuzz=>double |
+-------------------+------------------------------------------------------+
| Crop |geometry=>geometry, width=>integer, height=>integer, |
| |x=>integer, y=>integer |
+-------------------+------------------------------------------------------+
| Emboss | geometry=>geometry, radius=>double, sigma=>double |
+-------------------+------------------------------------------------------+

Some help please?

--

-Tommy Butler
see if I'm online »http://ooopps.sourceforge.net/online

Tommy Butler <[email protected]>
phone: (817)-466-2245
912 Greenridge Drive
Arlington, TX
76017-6243

the ooOPps Code Library
http://ooopps.sourceforge.net/pub/
 
M

Martien Verbruggen

[Please, do not ask for follow-up to poster if the response could be
useful for all readers of the newsgroup. Followup to poster is generally
only used when a discussion has reached a point where it should no
longer be continued on the group anymore.]

Many of the methods in Image::Magick require an argument named
"geometry". The docs at http://www.imagemagick.org/www/perl.html are
very vague about this. I don't understand what the "geometry"
argument is for, and I don't understand what kind of values to assign
it. It requires a syntax that I can't grasp. Can someone enlighten
me?

The documentation has several examples, as well as short lines stating
that geometry generally is short for widthXheight. This is generally the
case, although the 3rd and 4th argument chane their meaning sometimes,
depending on the methods called. Sometimes the geometry attribute can be
used with special characters that limit or extend its meaning, like
percentages for resizing. See the link below.

More information about geometry can be found in the generic manual pages
for the ImageMagick tools, and under the command line options to these
tools. See, for example

http://www.imagemagick.org/www/utilities.html

Without writing a complete reference for all methods (been there, done
that), I can't be that much more helpful.

I'd advise you to not use the geometry attribute, when there are options
that allow you to avoid it.

Martien
 
U

user

Martien said:
[Please, do not ask for follow-up to poster if the response could be
useful for all readers of the newsgroup. Followup to poster is generally
only used when a discussion has reached a point where it should no
longer be continued on the group anymore.]

I didn't know I did. But sorry.
More information about geometry can be found in the generic manual pages
for the ImageMagick tools, and under the command line options to these
tools. See, for example

http://www.imagemagick.org/www/utilities.html

Without writing a complete reference for all methods (been there, done
that), I can't be that much more helpful.

I'd advise you to not use the geometry attribute, when there are options
that allow you to avoid it.

I didn't know I could avoid it anywhere, but hey, I'll try! Thanks for the
info. Really, thanks very much.

--
-Tommy Butler
see if I'm online »http://ooopps.sourceforge.net/online

Tommy Butler <[email protected]>
phone: (817)-466-2245
912 Greenridge Drive
Arlington, TX
76017-6243

the ooOPps Code Library
http://ooopps.sourceforge.net/pub/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,104
Latest member
LesliVqm09
Top