reference/exif/functions/exif-imagetype.xml
f40e02ff1bd0eb238dc8e542434004de9eb03a58
...
...
@@ -9,7 +9,7 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>int</type><methodname>exif_imagetype</methodname>
12
+
<type class="union"><type>int</type><type>false</type></type><methodname>exif_imagetype</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
...
...
@@ -46,38 +46,6 @@
46
46
same value that <function>getimagesize</function> returns in index 2 but
47
47
<function>exif_imagetype</function> is much faster.
48
48
</para>
49
-
</refsect1>
50
-
<refsect1 role="changelog">
51
-
&reftitle.changelog;
52
-
<para>
53
-
<informaltable>
54
-
<tgroup cols="2">
55
-
<thead>
56
-
<row>
57
-
<entry>&Version;</entry>
58
-
<entry>&Description;</entry>
59
-
</row>
60
-
</thead>
61
-
<tbody>
62
-
<row>
63
-
<entry>4.3.2</entry>
64
-
<entry>
65
-
Support for <acronym>JPC</acronym>, <acronym>JP2</acronym>,
66
-
<acronym>JPX</acronym>, <acronym>JB2</acronym>,
67
-
<acronym>XBM</acronym>, and <acronym>WBMP</acronym>
68
-
</entry>
69
-
</row>
70
-
<row>
71
-
<entry>4.3.0</entry>
72
-
<entry>Support for <acronym>SWC</acronym></entry>
73
-
</row>
74
-
</tbody>
75
-
</tgroup>
76
-
</informaltable>
77
-
</para>
78
-
</refsect1>
79
-
<refsect1 role="constants">
80
-
&reftitle.constants;
81
49
<para>
82
50
The following constants are defined, and represent possible
83
51
<function>exif_imagetype</function> return values:
...
...
@@ -157,11 +125,64 @@
157
125
<entry>16</entry>
158
126
<entry><constant>IMAGETYPE_XBM</constant></entry>
159
127
</row>
128
+
<row>
129
+
<entry>17</entry>
130
+
<entry><constant>IMAGETYPE_ICO</constant></entry>
131
+
</row>
132
+
<row>
133
+
<entry>18</entry>
134
+
<entry><constant>IMAGETYPE_WEBP</constant></entry>
135
+
</row>
136
+
<row>
137
+
<entry>19</entry>
138
+
<entry><constant>IMAGETYPE_AVIF</constant></entry>
139
+
</row>
160
140
</tbody>
161
141
</tgroup>
162
142
</table>
163
143
</para>
144
+

145
+
<note>
146
+
<para>
147
+
<function>exif_imagetype</function> will emit an <constant>E_NOTICE</constant>
148
+
and return &false; if it is unable to read enough bytes from the file to
149
+
determine the image type.
150
+
<!-- If the function finds an incomplete PNG header then it may emit an
151
+
<constant>E_WARNING</constant> instead. - Is this worth including? -->
152
+
</para>
153
+
</note>
154
+

164
155
</refsect1>
156
+
<refsect1 role="changelog">
157
+
&reftitle.changelog;
158
+
<para>
159
+
<informaltable>
160
+
<tgroup cols="2">
161
+
<thead>
162
+
<row>
163
+
<entry>&Version;</entry>
164
+
<entry>&Description;</entry>
165
+
</row>
166
+
</thead>
167
+
<tbody>
168
+
<row>
169
+
<entry>7.1.0</entry>
170
+
<entry>
171
+
Added WebP support.
172
+
</entry>
173
+
</row>
174
+
<row>
175
+
<entry>8.1.0</entry>
176
+
<entry>
177
+
Added AVIF support.
178
+
</entry>
179
+
</row>
180
+
</tbody>
181
+
</tgroup>
182
+
</informaltable>
183
+
</para>
184
+
</refsect1>
185
+

165
186
<refsect1 role="examples">
166
187
&reftitle.examples;
167
188
<para>
...
...
@@ -183,12 +204,12 @@ if (exif_imagetype('image.gif') != IMAGETYPE_GIF) {
183
204
&reftitle.seealso;
184
205
<para>
185
206
<simplelist>
207
+
<member><function>image_type_to_mime_type</function></member>
186
208
<member><function>getimagesize</function></member>
187
209
</simplelist>
188
210
</para>
189
211
</refsect1>
190
212
</refentry>
191
-

192
213
<!-- Keep this comment at the end of the file
193
214
Local variables:
194
215
mode: sgml
195
216