reference/imagick/imagick/getsize.xml
73fae4ee51b644b72028e610abefefced57c18ad
...
...
@@ -9,13 +9,22 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>Imagick::getSize</methodname>
12
+
<modifier>public</modifier> <type>array</type><methodname>Imagick::getSize</methodname>
13
13
<void/>
14
14
</methodsynopsis>
15
15
<para>
16
-
Returns the size associated with the Imagick object as an array with the
17
-
keys "columns" and "rows".
16
+
Get the size in pixels associated with the Imagick object, previously set by <function>Imagick::setSize</function>.
18
17
</para>
18
+
<note>
19
+
<para>
20
+
This method just returns the size that was set using <function>Imagick::setSize</function>. If you want to get the actual width / height of the image, use <function>Imagick::getImageWidth</function> and <function>Imagick::getImageHeight</function>.
21
+
</para>
22
+
</note>
23
+
</refsect1>
24
+

25
+
<refsect1 role="parameters">
26
+
&reftitle.parameters;
27
+
&no.function.parameters;
19
28
</refsect1>
20
29

21
30
<refsect1 role="returnvalues">
...
...
@@ -26,6 +35,43 @@
26
35
</para>
27
36
</refsect1>
28
37
38
+
<refsect1 role="examples">
39
+
&reftitle.examples;
40
+
<para>
41
+
<example>
42
+
<title>Getting the size of a raw RGB image set at 200x400, after scaling to 400x800 (compared to width / height)</title>
43
+
<programlisting role="php">
44
+
<![CDATA[
45
+
<?php
46
+
//Set size first and then load the raw image
47
+
$img = new Imagick();
48
+
$img->setSize(200, 400);
49
+
$img->readImage("image.rgb");
50
+

51
+
$img->scaleImage(400, 800);
52
+

53
+
$size = $img->getSize();
54
+
print_r($size);
55
+

56
+
echo $img->getImageWidth()."x".$img->getImageHeight();
57
+
?>
58
+
]]>
59
+
</programlisting>
60
+
&example.outputs;
61
+
<screen>
62
+
<![CDATA[
63
+
Array
64
+
(
65
+
[columns] => 200
66
+
[rows] => 400
67
+
)
68
+
400x800
69
+
]]>
70
+
</screen>
71
+
</example>
72
+
</para>
73
+
</refsect1>
74
+

29
75
</refentry>
30
76

31
77
<!-- Keep this comment at the end of the file
32
78