williamr@2
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
// This is the public client API for EXIF-enabled ICL modules
|
williamr@2
|
15 |
//
|
williamr@2
|
16 |
//
|
williamr@2
|
17 |
|
williamr@2
|
18 |
#ifndef __CEXIFICL_H__
|
williamr@2
|
19 |
#define __CEXIFICL_H__
|
williamr@2
|
20 |
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#include <imageconversion.h>
|
williamr@2
|
23 |
#include <icl/imagetransformpluginext.h>
|
williamr@2
|
24 |
#include <icl/imageplugin.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
/**
|
williamr@2
|
27 |
@publishedAll
|
williamr@2
|
28 |
@released
|
williamr@2
|
29 |
|
williamr@2
|
30 |
IFD number representing Exif IFD 0.
|
williamr@2
|
31 |
|
williamr@2
|
32 |
For use in MExifMetadata methods when reading or writing IFD 0 tags other than GPS tags.
|
williamr@2
|
33 |
In other words, for reading or writing any of the following tags:
|
williamr@2
|
34 |
- IFD 0 TIFF tags (i.e. IFD 0 tags)
|
williamr@2
|
35 |
- IFD 0 Exif tags (i.e. Exif sub-IFD tags)
|
williamr@2
|
36 |
- Interoperability IFD tags
|
williamr@2
|
37 |
|
williamr@2
|
38 |
Note: To read or write GPS tags, use the IFD constant KExifGpsIfd instead.
|
williamr@2
|
39 |
*/
|
williamr@2
|
40 |
const TUint KExifIfdZero = 0;
|
williamr@2
|
41 |
|
williamr@2
|
42 |
/**
|
williamr@2
|
43 |
@publishedAll
|
williamr@2
|
44 |
@released
|
williamr@2
|
45 |
|
williamr@2
|
46 |
IFD number representing Exif IFD 1.
|
williamr@2
|
47 |
|
williamr@2
|
48 |
For use in MExifMetadata methods when reading or writing tags related to thumbnail (i.e. IFD 1 tags).
|
williamr@2
|
49 |
*/
|
williamr@2
|
50 |
const TUint KExifIfdOne = 1;
|
williamr@2
|
51 |
|
williamr@2
|
52 |
/**
|
williamr@2
|
53 |
@publishedAll
|
williamr@2
|
54 |
@released
|
williamr@2
|
55 |
|
williamr@2
|
56 |
IFD number representing the IFD 0 sub-IFD for GPS (i.e. the GPS IFD).
|
williamr@2
|
57 |
|
williamr@2
|
58 |
For use in MExifMetadata methods when reading or writing GPS tags.
|
williamr@2
|
59 |
*/
|
williamr@2
|
60 |
const TUint KExifGpsIfd = 0x00040000;
|
williamr@2
|
61 |
|
williamr@2
|
62 |
/**
|
williamr@2
|
63 |
@publishedAll
|
williamr@2
|
64 |
@released
|
williamr@2
|
65 |
|
williamr@2
|
66 |
describes a rational value
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
struct TRational
|
williamr@2
|
69 |
{
|
williamr@2
|
70 |
/** numerator of the rational
|
williamr@2
|
71 |
*/
|
williamr@2
|
72 |
union
|
williamr@2
|
73 |
{
|
williamr@2
|
74 |
TInt iNumerator;
|
williamr@2
|
75 |
TUint iUNumerator;
|
williamr@2
|
76 |
};
|
williamr@2
|
77 |
/** denominator of the rational. No checking is processed to know if this is null or not
|
williamr@2
|
78 |
*/
|
williamr@2
|
79 |
union
|
williamr@2
|
80 |
{
|
williamr@2
|
81 |
TInt iDenominator;
|
williamr@2
|
82 |
TUint iUDenominator;
|
williamr@2
|
83 |
};
|
williamr@2
|
84 |
};
|
williamr@2
|
85 |
|
williamr@2
|
86 |
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
@publishedAll
|
williamr@2
|
89 |
@released
|
williamr@2
|
90 |
|
williamr@2
|
91 |
generic accessor to read the tags from exif metadata.
|
williamr@2
|
92 |
|
williamr@2
|
93 |
Note: The aIfd argument in MExifMetadataReader methods should be set as follows:
|
williamr@2
|
94 |
- When reading an IFD 0 tag that is not a GPS tag, use KExifIfdZero.
|
williamr@2
|
95 |
- When reading a tag related to thumbnail, use KExifIfdOne.
|
williamr@2
|
96 |
- When reading a GPS tag, use KExifGpsIfd.
|
williamr@2
|
97 |
|
williamr@2
|
98 |
The TExifReaderUtility class offers a friendlier interface to access these tags.
|
williamr@2
|
99 |
|
williamr@2
|
100 |
@see TExifReaderUtility
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
class MExifMetadataReader
|
williamr@2
|
103 |
{
|
williamr@2
|
104 |
public:
|
williamr@2
|
105 |
/**
|
williamr@2
|
106 |
Get the data associated with a signed or unsigned 32-bit integer EXIF/DCF tag/IFD.
|
williamr@2
|
107 |
If used to get unsigned data, it is up to the caller to do the appropriate typecast of aParam.
|
williamr@2
|
108 |
|
williamr@2
|
109 |
@param aTag
|
williamr@2
|
110 |
the tag id where the data is stored
|
williamr@2
|
111 |
@param aIfd
|
williamr@2
|
112 |
the ifd section in which the tag is stored.
|
williamr@2
|
113 |
@param aParam
|
williamr@2
|
114 |
on return, the value of the tag
|
williamr@2
|
115 |
|
williamr@2
|
116 |
@return error code
|
williamr@2
|
117 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
118 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
119 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
120 |
*/
|
williamr@2
|
121 |
virtual TInt GetIntegerParam(TUint aTag, TUint aIfd, TInt& aParam) const = 0;
|
williamr@2
|
122 |
|
williamr@2
|
123 |
/**
|
williamr@2
|
124 |
Get the data associated with an unsigned short (16-bit) integer EXIF/DCF tag/IFD.
|
williamr@2
|
125 |
|
williamr@2
|
126 |
@param aTag
|
williamr@2
|
127 |
the tag id where the data is stored
|
williamr@2
|
128 |
@param aIfd
|
williamr@2
|
129 |
the ifd section in which the tag is stored.
|
williamr@2
|
130 |
@param aParam
|
williamr@2
|
131 |
on return, the value of the tag
|
williamr@2
|
132 |
|
williamr@2
|
133 |
@return error code
|
williamr@2
|
134 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
135 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
136 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
137 |
*/
|
williamr@2
|
138 |
virtual TInt GetShortParam(TUint aTag, TUint aIfd, TUint16& aParam) const = 0;
|
williamr@2
|
139 |
|
williamr@2
|
140 |
/**
|
williamr@2
|
141 |
Get the data associated with a signed or unsigned rational EXIF/DCF tag/IFD.
|
williamr@2
|
142 |
If used to get an unsigned rational, it is up to the caller to typecast aNumer & aDenom as appropriate.
|
williamr@2
|
143 |
|
williamr@2
|
144 |
@param aTag
|
williamr@2
|
145 |
the tag id where the data is stored
|
williamr@2
|
146 |
@param aIfd
|
williamr@2
|
147 |
the ifd section in which the tag is stored.
|
williamr@2
|
148 |
@param aNumer
|
williamr@2
|
149 |
on return, the numerator value of the tag
|
williamr@2
|
150 |
@param aDenom
|
williamr@2
|
151 |
on return, the denominator value of the tag
|
williamr@2
|
152 |
|
williamr@2
|
153 |
@return error code
|
williamr@2
|
154 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
155 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
156 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
157 |
*/
|
williamr@2
|
158 |
virtual TInt GetRationalParam(TUint aTag, TUint aIfd, TInt& aNumer, TInt& aDenom) const = 0;
|
williamr@2
|
159 |
/**
|
williamr@2
|
160 |
Get the data associated with an 8-bit (e.g. ASCII, Undefined or Byte) EXIF/DCF tag/IFD.
|
williamr@2
|
161 |
|
williamr@2
|
162 |
Ownership of the buffer pointed to by aParam transfers to the client, which is therefore responsible for deleting the buffer when required.
|
williamr@2
|
163 |
|
williamr@2
|
164 |
Note: The client should always initialise aParam to NULL, and the plugin should only assign to this parameter when ready to transfer ownership.
|
williamr@2
|
165 |
|
williamr@2
|
166 |
Note: If using this method to retrieve ASCII data, the returned data will not be NULL terminated.
|
williamr@2
|
167 |
|
williamr@2
|
168 |
Note: If using this method to retrieve Undefined data, the raw data will be returned, exactly as it appears in the tag value. Thus if the tag
|
williamr@2
|
169 |
is one that includes a character code prefix, then this prefix will be included in the returned data. See table 6 of the Exif 2.2 specification for a list of character code prefixes.
|
williamr@2
|
170 |
|
williamr@2
|
171 |
@param aTag
|
williamr@2
|
172 |
the tag id where the data is stored
|
williamr@2
|
173 |
@param aIfd
|
williamr@2
|
174 |
the ifd section in which the tag is stored.
|
williamr@2
|
175 |
@param aParam
|
williamr@2
|
176 |
on return, the value of the tag
|
williamr@2
|
177 |
|
williamr@2
|
178 |
@return error code
|
williamr@2
|
179 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
180 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
181 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
182 |
*/
|
williamr@2
|
183 |
virtual TInt GetParam8(TUint aTag, TUint aIfd, HBufC8*& aParam) const = 0;
|
williamr@2
|
184 |
|
williamr@2
|
185 |
/**
|
williamr@2
|
186 |
Get the data associated with a 16-bit EXIF/DCF tag/IFD.
|
williamr@2
|
187 |
|
williamr@2
|
188 |
Ownership of the buffer pointed to by aParam transfers to the client, which is therefore responsible for deleting the buffer when required.
|
williamr@2
|
189 |
|
williamr@2
|
190 |
Note: The client should always initialise aParam to NULL, and the plugin should only assign to this parameter when ready to transfer ownership.
|
williamr@2
|
191 |
|
williamr@2
|
192 |
Note: This method is not recommended. To get 16-bit data from a tag of undefined type, it is recommended that GetParam8() be used instead. The HBufC8* returned by GetParam8() can then be converted into an HBufC16* as needed.
|
williamr@2
|
193 |
|
williamr@2
|
194 |
If this method is used, please be aware of the following:
|
williamr@2
|
195 |
- It may only be used with the tags 0x9286 (UserComment), 0x001B (GpsProcessingMethod) & 0x001C (GpsAreaInformation).
|
williamr@2
|
196 |
- The supported tags might not contain 16-bit data. Only use this method if you are certain that the tag contain 16-bit data. If used on a tag containing 8-bit data, the 8-bit
|
williamr@2
|
197 |
data will be returned in the HBufC16* which will have to be manually converted to an HBufC8*.
|
williamr@2
|
198 |
- The first 8 bytes of the returned HBufC16* may contain a Character Code prefix. See table 6 of the Exif 2.2 specification for a list of Character Code prefixes.
|
williamr@2
|
199 |
- The length of the returned HBufC16* will include the length of the character code prefix if present.
|
williamr@2
|
200 |
|
williamr@2
|
201 |
@param aTag
|
williamr@2
|
202 |
the tag id where the data is stored
|
williamr@2
|
203 |
@param aIfd
|
williamr@2
|
204 |
the ifd section in which the tag is stored.
|
williamr@2
|
205 |
@param aParam
|
williamr@2
|
206 |
on return, the value of the tag
|
williamr@2
|
207 |
|
williamr@2
|
208 |
@return error code
|
williamr@2
|
209 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
210 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
211 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
212 |
*/
|
williamr@2
|
213 |
virtual TInt GetParam16(TUint aTag, TUint aIfd, HBufC16*& aParam) const = 0;
|
williamr@2
|
214 |
|
williamr@2
|
215 |
/**
|
williamr@2
|
216 |
Get the data associated with an array of signed or unsigned 32-bit integers EXIF/DCF tag/IFD.
|
williamr@2
|
217 |
If being used to get unsigned integers, it is up to the caller to typecast them as appropriate.
|
williamr@2
|
218 |
|
williamr@2
|
219 |
@param aTag
|
williamr@2
|
220 |
the tag id where the data is stored
|
williamr@2
|
221 |
@param aIfd
|
williamr@2
|
222 |
the ifd section in which the tag is stored.
|
williamr@2
|
223 |
@param aParam
|
williamr@2
|
224 |
on return, the array is filled with the list of values in this tag
|
williamr@2
|
225 |
|
williamr@2
|
226 |
Note: aParam will be resized to fit the number of data elements read.
|
williamr@2
|
227 |
|
williamr@2
|
228 |
@return error code
|
williamr@2
|
229 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
230 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
231 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
232 |
*/
|
williamr@2
|
233 |
virtual TInt GetIntegerArrayParam(TUint aTag, TUint aIfd, CArrayFix<TInt>& aParam) const = 0;
|
williamr@2
|
234 |
|
williamr@2
|
235 |
/**
|
williamr@2
|
236 |
Get the data associated with an array of unsigned short (16-bit) integers EXIF/DCF tag/IFD.
|
williamr@2
|
237 |
|
williamr@2
|
238 |
@param aTag
|
williamr@2
|
239 |
the tag id where the data is stored
|
williamr@2
|
240 |
@param aIfd
|
williamr@2
|
241 |
the ifd section in which the tag is stored.
|
williamr@2
|
242 |
@param aParam
|
williamr@2
|
243 |
on return, the array is filled with the list of values in this tag
|
williamr@2
|
244 |
|
williamr@2
|
245 |
Note: aParam will be resized to fit the number of data elements read.
|
williamr@2
|
246 |
|
williamr@2
|
247 |
@return error code
|
williamr@2
|
248 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
249 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
250 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
251 |
*/
|
williamr@2
|
252 |
virtual TInt GetShortArrayParam(TUint aTag, TUint aIfd, CArrayFix<TUint16>& aParam) const = 0;
|
williamr@2
|
253 |
|
williamr@2
|
254 |
/**
|
williamr@2
|
255 |
Get the data associated with an array of signed or unsigned rationals EXIF/DCF tag/IFD.
|
williamr@2
|
256 |
If used to get unsigned rational data, it is up to the client to typecast the components as appropriate.
|
williamr@2
|
257 |
|
williamr@2
|
258 |
@param aTag
|
williamr@2
|
259 |
the tag id where the data is stored
|
williamr@2
|
260 |
@param aIfd
|
williamr@2
|
261 |
the ifd section in which the tag is stored.
|
williamr@2
|
262 |
@param aParam
|
williamr@2
|
263 |
on return, the array is filled with the list of values in this tag
|
williamr@2
|
264 |
|
williamr@2
|
265 |
Note: aParam will be resized to fit the number of data elements read.
|
williamr@2
|
266 |
|
williamr@2
|
267 |
@return error code
|
williamr@2
|
268 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
269 |
KErrNotSupported if called on an encoding module.
|
williamr@2
|
270 |
KErrNotFound if the tag cannot be found.
|
williamr@2
|
271 |
*/
|
williamr@2
|
272 |
virtual TInt GetRationalArrayParam(TUint aTag, TUint aIfd, CArrayFix<TRational>& aParam) const = 0;
|
williamr@2
|
273 |
};
|
williamr@2
|
274 |
|
williamr@2
|
275 |
|
williamr@2
|
276 |
/**
|
williamr@2
|
277 |
@publishedAll
|
williamr@2
|
278 |
@released
|
williamr@2
|
279 |
|
williamr@2
|
280 |
generic accessor to write the tags from exif metadata.
|
williamr@2
|
281 |
|
williamr@2
|
282 |
Note: The aIfd argument in MExifMetadataWriter methods should be set as follows:
|
williamr@2
|
283 |
- When writing to an IFD 0 tag that is not a GPS tag, use KExifIfdZero.
|
williamr@2
|
284 |
- When writing to a tag related to thumbnail, use KExifIfdOne.
|
williamr@2
|
285 |
- When writing to a GPS tag, use KExifGpsIfd.
|
williamr@2
|
286 |
|
williamr@2
|
287 |
The TExifWriterUtility class offers a friendlier interface to access these tags.
|
williamr@2
|
288 |
|
williamr@2
|
289 |
@see TExifWriterUtility
|
williamr@2
|
290 |
*/
|
williamr@2
|
291 |
class MExifMetadataWriter
|
williamr@2
|
292 |
{
|
williamr@2
|
293 |
public:
|
williamr@2
|
294 |
// Setters
|
williamr@2
|
295 |
/**
|
williamr@2
|
296 |
Set the data associated with an 8-bit (e.g. ASCII, Undefined or Byte) EXIF/DCF tag/IFD.
|
williamr@2
|
297 |
|
williamr@2
|
298 |
Note: If setting non-NULL terminated ASCII data, this method will add a NULL terminator to it provided that doing so will not cause the length of the tag value to be exceeded. If the length would be exceeded KErrArgument will be returned.
|
williamr@2
|
299 |
|
williamr@2
|
300 |
Note: This method will set other (non-ASCII) 8-bit data exactly as-is.
|
williamr@2
|
301 |
|
williamr@2
|
302 |
@param aTag
|
williamr@2
|
303 |
the tag id where the data is stored
|
williamr@2
|
304 |
@param aIfd
|
williamr@2
|
305 |
the ifd section in which the tag is stored.
|
williamr@2
|
306 |
@param aParam
|
williamr@2
|
307 |
the value of the tag
|
williamr@2
|
308 |
|
williamr@2
|
309 |
@return error code
|
williamr@2
|
310 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
311 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
312 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
313 |
*/
|
williamr@2
|
314 |
virtual TInt SetParam8(TUint aTag, TUint aIfd, HBufC8* aParam) = 0;
|
williamr@2
|
315 |
|
williamr@2
|
316 |
/**
|
williamr@2
|
317 |
Set 16-bit Unicode data into EXIF/DCF tag/IFDs that support it (e.g.0x9286 (UserComment), 0x001B (GpsProcessingMethod) or 0x001C (GpsAreaInformation) ).
|
williamr@2
|
318 |
|
williamr@2
|
319 |
Note: This method will add the 8-byte prefix "UNICODE/0" to aParam before setting the tag value in the metadata. It may only be used to set Unicode data.
|
williamr@2
|
320 |
|
williamr@2
|
321 |
@param aTag
|
williamr@2
|
322 |
the tag id where the data is stored
|
williamr@2
|
323 |
@param aIfd
|
williamr@2
|
324 |
the ifd section in which the tag is stored.
|
williamr@2
|
325 |
@param aParam
|
williamr@2
|
326 |
the value of the tag
|
williamr@2
|
327 |
|
williamr@2
|
328 |
|
williamr@2
|
329 |
@return error code
|
williamr@2
|
330 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
331 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
332 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
333 |
*/
|
williamr@2
|
334 |
virtual TInt SetParam16(TUint aTag, TUint aIfd, HBufC16* aParam) = 0;
|
williamr@2
|
335 |
|
williamr@2
|
336 |
/**
|
williamr@2
|
337 |
Sets the data associated with a signed or unsigned 32-bit integer EXIF/DCF tag/IFD.
|
williamr@2
|
338 |
|
williamr@2
|
339 |
@param aTag
|
williamr@2
|
340 |
the tag id where the data is stored
|
williamr@2
|
341 |
@param aIfd
|
williamr@2
|
342 |
the ifd section in which the tag is stored.
|
williamr@2
|
343 |
@param aParam
|
williamr@2
|
344 |
the value of the tag
|
williamr@2
|
345 |
|
williamr@2
|
346 |
@return error code
|
williamr@2
|
347 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
348 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
349 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
350 |
*/
|
williamr@2
|
351 |
virtual TInt SetIntegerParam(TUint aTag, TUint aIfd, TInt aParam) = 0;
|
williamr@2
|
352 |
|
williamr@2
|
353 |
/**
|
williamr@2
|
354 |
Sets the data associated with an unsigned short (16-bit) EXIF/DCF tag/IFD.
|
williamr@2
|
355 |
|
williamr@2
|
356 |
@param aTag
|
williamr@2
|
357 |
the tag id where the data is stored
|
williamr@2
|
358 |
@param aIfd
|
williamr@2
|
359 |
the ifd section in which the tag is stored.
|
williamr@2
|
360 |
@param aParam
|
williamr@2
|
361 |
the value of the tag
|
williamr@2
|
362 |
|
williamr@2
|
363 |
@return error code
|
williamr@2
|
364 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
365 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
366 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
367 |
*/
|
williamr@2
|
368 |
virtual TInt SetShortParam(TUint aTag, TUint aIfd, TUint16 aParam) = 0;
|
williamr@2
|
369 |
|
williamr@2
|
370 |
/**
|
williamr@2
|
371 |
Sets the data associated with a signed or unsigned rational EXIF/DCF tag/IFD.
|
williamr@2
|
372 |
|
williamr@2
|
373 |
@param aTag
|
williamr@2
|
374 |
the tag id where the data is stored
|
williamr@2
|
375 |
@param aIfd
|
williamr@2
|
376 |
the ifd section in which the tag is stored.
|
williamr@2
|
377 |
@param aNumerator
|
williamr@2
|
378 |
the numerator value of the rational tag
|
williamr@2
|
379 |
@param aDenominator
|
williamr@2
|
380 |
the denominator value of the rational tag
|
williamr@2
|
381 |
|
williamr@2
|
382 |
@return error code
|
williamr@2
|
383 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
384 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
385 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
386 |
*/
|
williamr@2
|
387 |
virtual TInt SetRationalParam(TUint aTag, TUint aIfd, TInt aNumerator, TInt aDenominator) = 0;
|
williamr@2
|
388 |
|
williamr@2
|
389 |
/**
|
williamr@2
|
390 |
Sets the data associated with an array of signed or unsigned 32-bit integers EXIF/DCF tag/IFD.
|
williamr@2
|
391 |
|
williamr@2
|
392 |
@param aTag
|
williamr@2
|
393 |
the tag id where the data is stored
|
williamr@2
|
394 |
@param aIfd
|
williamr@2
|
395 |
the ifd section in which the tag is stored.
|
williamr@2
|
396 |
@param aParam
|
williamr@2
|
397 |
the list of values value for the tag
|
williamr@2
|
398 |
|
williamr@2
|
399 |
@return error code
|
williamr@2
|
400 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
401 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
402 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
403 |
*/
|
williamr@2
|
404 |
virtual TInt SetIntegerArrayParam(TUint aTag, TUint aIfd, CArrayFix<TInt>& aParam) = 0;
|
williamr@2
|
405 |
|
williamr@2
|
406 |
/**
|
williamr@2
|
407 |
Sets the data associated with an array of unsigned short (16-bit) EXIF/DCF tag/IFD.
|
williamr@2
|
408 |
|
williamr@2
|
409 |
@param aTag
|
williamr@2
|
410 |
the tag id where the data is stored
|
williamr@2
|
411 |
@param aIfd
|
williamr@2
|
412 |
the ifd section in which the tag is stored.
|
williamr@2
|
413 |
@param aParam
|
williamr@2
|
414 |
the list of values value for the tag
|
williamr@2
|
415 |
|
williamr@2
|
416 |
@return error code
|
williamr@2
|
417 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
418 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
419 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
420 |
*/
|
williamr@2
|
421 |
virtual TInt SetShortArrayParam(TUint aTag, TUint aIfd, CArrayFix<TUint16>& aParam) = 0;
|
williamr@2
|
422 |
|
williamr@2
|
423 |
/**
|
williamr@2
|
424 |
Sets the data associated with an array of signed or unsigned rationals EXIF/DCF tag/IFD.
|
williamr@2
|
425 |
|
williamr@2
|
426 |
@param aTag
|
williamr@2
|
427 |
the tag id where the data is stored
|
williamr@2
|
428 |
@param aIfd
|
williamr@2
|
429 |
the ifd section in which the tag is stored.
|
williamr@2
|
430 |
@param aParam
|
williamr@2
|
431 |
the list of values value for the tag
|
williamr@2
|
432 |
|
williamr@2
|
433 |
@return error code
|
williamr@2
|
434 |
KErrNotSupported if called on a decoding module.
|
williamr@2
|
435 |
KErrNotSupported if the plugin does not support the specified tag.
|
williamr@2
|
436 |
KErrArgument if the requested data type does not match with the tag.
|
williamr@2
|
437 |
*/
|
williamr@2
|
438 |
virtual TInt SetRationalArrayParam(TUint aTag, TUint aIfd, CArrayFix<TRational>& aParam) = 0;
|
williamr@2
|
439 |
};
|
williamr@2
|
440 |
|
williamr@2
|
441 |
|
williamr@2
|
442 |
/**
|
williamr@2
|
443 |
@publishedAll
|
williamr@2
|
444 |
@released
|
williamr@2
|
445 |
|
williamr@2
|
446 |
generic accessor to access the tags from exif metadata.
|
williamr@2
|
447 |
The TExifWriterUtility & TExifReaderUtility classes offer friendlier interfaces to access these tags.
|
williamr@2
|
448 |
*/
|
williamr@2
|
449 |
class MExifMetadata: public MExifMetadataReader, public MExifMetadataWriter
|
williamr@2
|
450 |
{
|
williamr@2
|
451 |
public:
|
williamr@2
|
452 |
};
|
williamr@2
|
453 |
|
williamr@2
|
454 |
|
williamr@2
|
455 |
/**
|
williamr@2
|
456 |
@publishedAll
|
williamr@2
|
457 |
@released
|
williamr@2
|
458 |
|
williamr@2
|
459 |
Provides access to the exif jpeg decoder.
|
williamr@2
|
460 |
|
williamr@2
|
461 |
This class provides functions to decode jpeg images held in files or descriptors.
|
williamr@2
|
462 |
*/
|
williamr@2
|
463 |
class CJPEGExifDecoder : public CImageDecoder
|
williamr@2
|
464 |
{
|
williamr@2
|
465 |
public:
|
williamr@2
|
466 |
class CBody;
|
williamr@2
|
467 |
friend class CBody;
|
williamr@2
|
468 |
|
williamr@2
|
469 |
IMPORT_C static CJPEGExifDecoder* NewL();
|
williamr@2
|
470 |
IMPORT_C ~CJPEGExifDecoder();
|
williamr@2
|
471 |
|
williamr@2
|
472 |
IMPORT_C MExifMetadata* ExifMetadata();
|
williamr@2
|
473 |
|
williamr@2
|
474 |
protected:
|
williamr@2
|
475 |
IMPORT_C CJPEGExifDecoder();
|
williamr@2
|
476 |
IMPORT_C void ConstructL();
|
williamr@2
|
477 |
|
williamr@2
|
478 |
private:
|
williamr@2
|
479 |
CBody* iBody;
|
williamr@2
|
480 |
};
|
williamr@2
|
481 |
|
williamr@2
|
482 |
/**
|
williamr@2
|
483 |
@publishedAll
|
williamr@2
|
484 |
@released
|
williamr@2
|
485 |
|
williamr@2
|
486 |
Provides access to the exif jpeg encoder.
|
williamr@2
|
487 |
|
williamr@2
|
488 |
This class provides functions to encode jpeg images held in files or descriptors.
|
williamr@2
|
489 |
*/
|
williamr@2
|
490 |
class CJPEGExifEncoder : public CImageEncoder
|
williamr@2
|
491 |
{
|
williamr@2
|
492 |
public:
|
williamr@2
|
493 |
class CBody;
|
williamr@2
|
494 |
friend class CBody;
|
williamr@2
|
495 |
|
williamr@2
|
496 |
IMPORT_C static CJPEGExifEncoder* NewL();
|
williamr@2
|
497 |
IMPORT_C ~CJPEGExifEncoder();
|
williamr@2
|
498 |
|
williamr@2
|
499 |
IMPORT_C MExifMetadata* ExifMetadata();
|
williamr@2
|
500 |
|
williamr@2
|
501 |
protected:
|
williamr@2
|
502 |
IMPORT_C CJPEGExifEncoder();
|
williamr@2
|
503 |
IMPORT_C void ConstructL();
|
williamr@2
|
504 |
|
williamr@2
|
505 |
private:
|
williamr@2
|
506 |
CBody* iBody;
|
williamr@2
|
507 |
};
|
williamr@2
|
508 |
|
williamr@2
|
509 |
/**
|
williamr@2
|
510 |
@publishedAll
|
williamr@2
|
511 |
@released
|
williamr@2
|
512 |
|
williamr@2
|
513 |
The plugin API for Image Converter Library EXIF decoder plugins.
|
williamr@2
|
514 |
*/
|
williamr@2
|
515 |
class CJPEGExifDecoderPlugin : public CImageDecoderPlugin
|
williamr@2
|
516 |
{
|
williamr@2
|
517 |
public:
|
williamr@2
|
518 |
/**
|
williamr@2
|
519 |
Returns the EXIF metadata associated with the image being decoded.
|
williamr@2
|
520 |
This is a pure virtual function that each individual plugin must implement.
|
williamr@2
|
521 |
|
williamr@2
|
522 |
@return A pointer to the metadata. NULL if there is no metadata available.
|
williamr@2
|
523 |
*/
|
williamr@2
|
524 |
IMPORT_C virtual MExifMetadata* ExifMetadata() = 0;
|
williamr@2
|
525 |
};
|
williamr@2
|
526 |
|
williamr@2
|
527 |
/**
|
williamr@2
|
528 |
@publishedAll
|
williamr@2
|
529 |
@released
|
williamr@2
|
530 |
|
williamr@2
|
531 |
The plugin API for Image Converter Library EXIF encoder plugins.
|
williamr@2
|
532 |
*/
|
williamr@2
|
533 |
class CJPEGExifEncoderPlugin : public CImageEncoderPlugin
|
williamr@2
|
534 |
{
|
williamr@2
|
535 |
public:
|
williamr@2
|
536 |
/**
|
williamr@2
|
537 |
Returns the EXIF metadata associated with the image being encoded.
|
williamr@2
|
538 |
This is a pure virtual function that each individual plugin must implement.
|
williamr@2
|
539 |
|
williamr@2
|
540 |
@return A pointer to the metadata. NULL if there is no metadata available.
|
williamr@2
|
541 |
*/
|
williamr@2
|
542 |
IMPORT_C virtual MExifMetadata* ExifMetadata() = 0;
|
williamr@2
|
543 |
};
|
williamr@2
|
544 |
|
williamr@2
|
545 |
/**
|
williamr@2
|
546 |
@publishedAll
|
williamr@2
|
547 |
@released
|
williamr@2
|
548 |
|
williamr@2
|
549 |
extension for exif Image Transform
|
williamr@2
|
550 |
|
williamr@2
|
551 |
This class gives access to the exif metadata in a jpeg image during the transform operation
|
williamr@2
|
552 |
|
williamr@2
|
553 |
@see CImageTranform
|
williamr@2
|
554 |
*/
|
williamr@2
|
555 |
class CJPEGExifTransformExtension : public CImageTransformPluginExtension
|
williamr@2
|
556 |
{
|
williamr@2
|
557 |
public:
|
williamr@2
|
558 |
IMPORT_C virtual MExifMetadata* ExifMetadata();
|
williamr@2
|
559 |
};
|
williamr@2
|
560 |
|
williamr@2
|
561 |
#endif // __CEXIFICL_H__
|
williamr@4
|
562 |
|