williamr@4
|
1 |
// Copyright (c) 1998-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 |
// BC Version that uses CImageDecode/Encode objects but is essentially source
|
williamr@2
|
15 |
// compatible with the old MdaImageConverter calls
|
williamr@2
|
16 |
//
|
williamr@4
|
17 |
//
|
williamr@4
|
18 |
|
williamr@2
|
19 |
/**
|
williamr@2
|
20 |
@file
|
williamr@2
|
21 |
@deprecated
|
williamr@2
|
22 |
*/
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#ifndef __MDAIMAGECONVERTER_H__
|
williamr@2
|
25 |
#define __MDAIMAGECONVERTER_H__
|
williamr@2
|
26 |
|
williamr@2
|
27 |
#include <fbs.h>
|
williamr@2
|
28 |
|
williamr@2
|
29 |
#include <icl/imagedata.h>
|
williamr@4
|
30 |
#include <mda/common/resource.h>
|
williamr@2
|
31 |
#include <mda/client/utility.h>
|
williamr@2
|
32 |
#include <mda/common/video.h>
|
williamr@2
|
33 |
|
williamr@2
|
34 |
class CMdaServer;
|
williamr@2
|
35 |
class REComSession;
|
williamr@2
|
36 |
|
williamr@2
|
37 |
/**
|
williamr@2
|
38 |
@publishedAll
|
williamr@2
|
39 |
@deprecated 7.0s - Replaced by Image Conversion library - no direct equivalent
|
williamr@2
|
40 |
|
williamr@2
|
41 |
This class has been deprecated in 7.0s.
|
williamr@2
|
42 |
|
williamr@2
|
43 |
An interface to a set of image conversion utility callback functions.
|
williamr@2
|
44 |
|
williamr@2
|
45 |
The class is a mixin and is intended to be inherited by the client
|
williamr@2
|
46 |
classes which observe the image conversion operations. The functions
|
williamr@2
|
47 |
encapsulated by this class are called when the open, create and
|
williamr@2
|
48 |
conversion operations complete.The interface is also used by the
|
williamr@2
|
49 |
bitmap image rotator and the bitmap image re-scaler. A reference to
|
williamr@2
|
50 |
this object is passed as a parameter when constructing image
|
williamr@2
|
51 |
conversion utility, image rotator and image re-scaler objects.
|
williamr@2
|
52 |
|
williamr@2
|
53 |
@since 5.0
|
williamr@2
|
54 |
*/
|
williamr@2
|
55 |
class MMdaImageUtilObserver
|
williamr@2
|
56 |
{
|
williamr@2
|
57 |
public:
|
williamr@2
|
58 |
|
williamr@2
|
59 |
/**
|
williamr@2
|
60 |
Defines required client behaviour when a create operation has
|
williamr@2
|
61 |
completed.
|
williamr@2
|
62 |
|
williamr@2
|
63 |
@param aError
|
williamr@2
|
64 |
A value identifying the status of the create
|
williamr@2
|
65 |
operation. KErrNone or one of the system
|
williamr@2
|
66 |
wide error codes.
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
virtual void MiuoCreateComplete(TInt aError) = 0;
|
williamr@2
|
69 |
|
williamr@2
|
70 |
/**
|
williamr@2
|
71 |
Defines required client behaviour when an open operation has
|
williamr@2
|
72 |
completed.
|
williamr@2
|
73 |
|
williamr@2
|
74 |
@param aError
|
williamr@2
|
75 |
A value identifying the status of the create
|
williamr@2
|
76 |
operation. KErrNone or one of the system
|
williamr@2
|
77 |
wide error codes.
|
williamr@2
|
78 |
*/
|
williamr@2
|
79 |
virtual void MiuoOpenComplete(TInt aError) = 0;
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
Defines required client behaviour when a conversion, image rotation or
|
williamr@2
|
83 |
image re-scaling operation has completed.
|
williamr@2
|
84 |
|
williamr@2
|
85 |
@param aError
|
williamr@2
|
86 |
A value identifying the status of the operation.
|
williamr@2
|
87 |
KErrNone or one of the system wide error
|
williamr@2
|
88 |
codes.
|
williamr@2
|
89 |
*/
|
williamr@2
|
90 |
virtual void MiuoConvertComplete(TInt aError) = 0;
|
williamr@2
|
91 |
};
|
williamr@2
|
92 |
|
williamr@2
|
93 |
// Note: TFrameInfo is now declared via ImageClientApi - was previously here
|
williamr@2
|
94 |
|
williamr@2
|
95 |
|
williamr@2
|
96 |
class CMdaImageUtilityPriv;
|
williamr@2
|
97 |
|
williamr@2
|
98 |
/**
|
williamr@2
|
99 |
@publishedAll
|
williamr@2
|
100 |
@deprecated 7.0s - Replaced by Image Conversion library - no direct equivalent
|
williamr@2
|
101 |
|
williamr@2
|
102 |
Defines the public interface to image conversion.
|
williamr@2
|
103 |
|
williamr@2
|
104 |
This class has been deprecated in 7.0s, it's functionality is now part of the
|
williamr@2
|
105 |
Image Converter Library. For more information see CImageEncoder and CImageDecoder.
|
williamr@2
|
106 |
|
williamr@2
|
107 |
Clients of the concrete conversion classes call the functions provided
|
williamr@2
|
108 |
by this interface to perform the conversion. The implementation of
|
williamr@2
|
109 |
these functions is provided either by the concrete conversion classes
|
williamr@2
|
110 |
themselves or by private implementation classes.
|
williamr@2
|
111 |
|
williamr@2
|
112 |
@since 5.0
|
williamr@2
|
113 |
@see CImageEncoder
|
williamr@2
|
114 |
@see CImageDecoder
|
williamr@2
|
115 |
*/
|
williamr@2
|
116 |
class CMdaImageUtility : public CActive, private MMdaObjectStateChangeObserver
|
williamr@2
|
117 |
{
|
williamr@2
|
118 |
friend class CMdaImageUtilityPriv;
|
williamr@2
|
119 |
|
williamr@2
|
120 |
public:
|
williamr@2
|
121 |
virtual ~CMdaImageUtility();
|
williamr@2
|
122 |
IMPORT_C virtual void Close();
|
williamr@2
|
123 |
|
williamr@2
|
124 |
/**
|
williamr@2
|
125 |
Begins the image conversion operation for the specified frame
|
williamr@2
|
126 |
overloaded function.
|
williamr@2
|
127 |
|
williamr@2
|
128 |
The operation is asynchronous. When the conversion operation is
|
williamr@2
|
129 |
complete, successfully or otherwise, the callback function
|
williamr@2
|
130 |
MMdaImageUtilObserver::MiuoConvertComplete() is
|
williamr@2
|
131 |
called.When converting from a file or descriptor to a bitmap, the
|
williamr@2
|
132 |
operation can complete with KErrUnderflow, if there is
|
williamr@2
|
133 |
insufficient information in the file or descriptor. Typically, this
|
williamr@2
|
134 |
occurs when using the file or descriptor as a cache. In this
|
williamr@2
|
135 |
situation, the conversion operation should be performed repeatedly
|
williamr@2
|
136 |
until the file or descriptor has accumulated enough information for
|
williamr@2
|
137 |
the operation to complete with KErrNone. As much of the
|
williamr@2
|
138 |
image as is present is converted and written to the target bitmap at
|
williamr@2
|
139 |
each call to this function.
|
williamr@2
|
140 |
|
williamr@2
|
141 |
@param aBitmap
|
williamr@2
|
142 |
A reference to a bitmap. This may be a source or a
|
williamr@2
|
143 |
target for the conversion process, depending on the
|
williamr@2
|
144 |
concrete conversion class utility being used.
|
williamr@2
|
145 |
@param aFrameNumber
|
williamr@2
|
146 |
The frame number. This value is relative to zero. For
|
williamr@2
|
147 |
those concrete conversion classes which perform
|
williamr@2
|
148 |
conversion from a bitmap, this value must always be
|
williamr@2
|
149 |
zero. For those concrete conversion classes which
|
williamr@2
|
150 |
perform conversion to a bitmap, this value must be
|
williamr@2
|
151 |
less than the number of frames in the image.
|
williamr@2
|
152 |
*/
|
williamr@2
|
153 |
virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0) = 0;
|
williamr@2
|
154 |
|
williamr@2
|
155 |
/**
|
williamr@2
|
156 |
Begins the image conversion operation for the specified frame overloaded function.
|
williamr@2
|
157 |
|
williamr@2
|
158 |
The operation is asynchronous. When the conversion operation is complete, successfully or otherwise, the
|
williamr@2
|
159 |
callback function MMdaImageUtilObserver::MiuoConvertComplete() is called.When converting from a file or
|
williamr@2
|
160 |
descriptor to a bitmap, the operation can complete with KErrUnderflow, if there is insufficient information
|
williamr@2
|
161 |
in the file or descriptor. Typically, this occurs when using the file or descriptor as a cache. In this
|
williamr@2
|
162 |
situation, the conversion operation should be performed repeatedly until the file or descriptor has accumulated
|
williamr@2
|
163 |
enough information for the operation to complete with KErrNone. As much of the image as is present is converted
|
williamr@2
|
164 |
and written to the target bitmap at each call to this function.
|
williamr@2
|
165 |
|
williamr@2
|
166 |
@param aBitmap
|
williamr@2
|
167 |
A reference to a bitmap. This may be a source or a target for the conversion process, depending on
|
williamr@2
|
168 |
the concrete conversion class utility being used.
|
williamr@2
|
169 |
@param aMaskBitmap
|
williamr@2
|
170 |
A source or target mask bitmap, if present.
|
williamr@2
|
171 |
@param aFrameNumber
|
williamr@2
|
172 |
The frame number. This value is relative to zero. For those concrete conversion classes which perform
|
williamr@2
|
173 |
conversion from a bitmap, this value must always be zero. For those concrete conversion classes which
|
williamr@2
|
174 |
perform conversion to a bitmap, this value must be less than the number of frames in the image.
|
williamr@2
|
175 |
|
williamr@2
|
176 |
@see CMdaImageUtility::ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0)
|
williamr@2
|
177 |
*/
|
williamr@2
|
178 |
virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0) = 0;
|
williamr@2
|
179 |
|
williamr@2
|
180 |
/**
|
williamr@2
|
181 |
Cancels the conversion operation.
|
williamr@2
|
182 |
|
williamr@2
|
183 |
The callback function MMdaImageUtilObserver::MiuoConvertComplete() is not called.
|
williamr@2
|
184 |
*/
|
williamr@2
|
185 |
virtual void CancelConvertL() = 0;
|
williamr@2
|
186 |
IMPORT_C virtual void FrameInfo(TInt aFrame,TFrameInfo& aInfo) const;
|
williamr@2
|
187 |
IMPORT_C virtual TInt FrameCount() const;
|
williamr@2
|
188 |
public:
|
williamr@2
|
189 |
// Reserved functions - do not call
|
williamr@2
|
190 |
virtual void ImageUtil_Reserved1();
|
williamr@2
|
191 |
virtual void ImageUtil_Reserved2();
|
williamr@2
|
192 |
virtual void ImageUtil_Reserved3();
|
williamr@2
|
193 |
virtual void ImageUtil_Reserved4();
|
williamr@2
|
194 |
protected:
|
williamr@2
|
195 |
/**
|
williamr@2
|
196 |
@internalComponent
|
williamr@2
|
197 |
*/
|
williamr@2
|
198 |
CMdaImageUtility();
|
williamr@2
|
199 |
virtual void DoClose();
|
williamr@2
|
200 |
// From MMdaObjectStateChangeObserver
|
williamr@2
|
201 |
virtual void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
|
williamr@2
|
202 |
/**
|
williamr@2
|
203 |
@internalComponent
|
williamr@2
|
204 |
*/
|
williamr@2
|
205 |
void SelfComplete(TInt aError);
|
williamr@2
|
206 |
/**
|
williamr@2
|
207 |
@internalComponent
|
williamr@2
|
208 |
*/
|
williamr@2
|
209 |
void DoCancel();
|
williamr@2
|
210 |
protected:
|
williamr@2
|
211 |
/**@internalTechnology*/
|
williamr@2
|
212 |
CMdaImageUtilityPriv* iProperties;
|
williamr@2
|
213 |
};
|
williamr@2
|
214 |
|
williamr@2
|
215 |
|
williamr@2
|
216 |
class CImageDecoder;
|
williamr@2
|
217 |
class CMdaImageDataReadUtilityPriv;
|
williamr@2
|
218 |
|
williamr@2
|
219 |
/**
|
williamr@2
|
220 |
@publishedAll
|
williamr@2
|
221 |
@deprecated
|
williamr@2
|
222 |
|
williamr@2
|
223 |
Base class used in the derivation of
|
williamr@2
|
224 |
CMdaImageDescToBitmapUtility and
|
williamr@2
|
225 |
CMdaImageFileToBitmapUtility.
|
williamr@2
|
226 |
|
williamr@2
|
227 |
It has no user accessible functions.
|
williamr@2
|
228 |
|
williamr@2
|
229 |
Replaced by Image Conversion library - see CImageDecoder
|
williamr@2
|
230 |
|
williamr@2
|
231 |
@since 6.0
|
williamr@2
|
232 |
@see CImageDecoder
|
williamr@2
|
233 |
*/
|
williamr@2
|
234 |
class CMdaImageDataReadUtility : public CMdaImageUtility
|
williamr@2
|
235 |
{
|
williamr@2
|
236 |
friend class CMdaImageDataReadUtilityPriv;
|
williamr@2
|
237 |
|
williamr@2
|
238 |
public:
|
williamr@2
|
239 |
virtual ~CMdaImageDataReadUtility();
|
williamr@2
|
240 |
// From CMdaImageUtility
|
williamr@2
|
241 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0);
|
williamr@2
|
242 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0);
|
williamr@2
|
243 |
IMPORT_C virtual void CancelConvertL();
|
williamr@2
|
244 |
// from CActive
|
williamr@2
|
245 |
virtual void RunL();
|
williamr@2
|
246 |
virtual void DoCancel();
|
williamr@2
|
247 |
IMPORT_C virtual const TDesC& FrameCommentL(TInt aFrameNumber);
|
williamr@2
|
248 |
public:
|
williamr@2
|
249 |
// Reserved functions - do not call
|
williamr@2
|
250 |
virtual void ImageReadUtil_Reserved2();
|
williamr@2
|
251 |
virtual void ImageReadUtil_Reserved3();
|
williamr@2
|
252 |
virtual void ImageReadUtil_Reserved4();
|
williamr@2
|
253 |
protected:
|
williamr@2
|
254 |
// Creates relevant iDecoder property - depending on subclass.
|
williamr@2
|
255 |
// Called by "background" AO processing.
|
williamr@4
|
256 |
|
williamr@2
|
257 |
/**
|
williamr@2
|
258 |
@internalComponent
|
williamr@2
|
259 |
*/
|
williamr@2
|
260 |
void DoOpenL();
|
williamr@4
|
261 |
|
williamr@2
|
262 |
// From CMdaImageUtility
|
williamr@2
|
263 |
virtual void DoClose();
|
williamr@2
|
264 |
private:
|
williamr@2
|
265 |
inline CMdaImageDataReadUtilityPriv* Properties() const;
|
williamr@2
|
266 |
};
|
williamr@2
|
267 |
|
williamr@2
|
268 |
|
williamr@2
|
269 |
class CImageEncoder;
|
williamr@2
|
270 |
class CMdaImageDataWriteUtilityPriv;
|
williamr@2
|
271 |
|
williamr@2
|
272 |
/**
|
williamr@2
|
273 |
@publishedAll
|
williamr@2
|
274 |
@deprecated 7.0s - Replaced by Image Conversion library - see CImageEncoder
|
williamr@2
|
275 |
|
williamr@2
|
276 |
Base class used in the derivation of CMdaImageBitmapToDescUtility and CMdaImageBitmapToFileUtility.
|
williamr@2
|
277 |
|
williamr@2
|
278 |
It has no user accessible functions.
|
williamr@2
|
279 |
|
williamr@2
|
280 |
@since 6.0
|
williamr@2
|
281 |
|
williamr@2
|
282 |
@see CMdaImageBitmapToDescUtility
|
williamr@2
|
283 |
@see CMdaImageBitmapToFileUtility
|
williamr@2
|
284 |
*/
|
williamr@2
|
285 |
class CMdaImageDataWriteUtility : public CMdaImageUtility
|
williamr@2
|
286 |
{
|
williamr@2
|
287 |
friend class CMdaImageDataWriteUtilityPriv;
|
williamr@2
|
288 |
|
williamr@2
|
289 |
public:
|
williamr@2
|
290 |
virtual ~CMdaImageDataWriteUtility();
|
williamr@2
|
291 |
// From CMdaImageUtility
|
williamr@2
|
292 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0);
|
williamr@2
|
293 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,const TRect& aSourceRect,TInt aFrameNumber = 0);
|
williamr@2
|
294 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0);
|
williamr@2
|
295 |
IMPORT_C virtual void CancelConvertL();
|
williamr@2
|
296 |
protected:
|
williamr@2
|
297 |
virtual void RunL();
|
williamr@2
|
298 |
virtual void DoCancel();
|
williamr@2
|
299 |
protected:
|
williamr@2
|
300 |
virtual CImageEncoder* Encoder() const;
|
williamr@2
|
301 |
public:
|
williamr@2
|
302 |
// Reserved functions - do not call
|
williamr@2
|
303 |
virtual void ImageWriteUtil_Reserved1();
|
williamr@2
|
304 |
virtual void ImageWriteUtil_Reserved2();
|
williamr@2
|
305 |
virtual void ImageWriteUtil_Reserved3();
|
williamr@2
|
306 |
protected:
|
williamr@2
|
307 |
// Creates relevant <code>iEncoder</code> property - depending on subclass.
|
williamr@2
|
308 |
// Called by "background" AO processing.
|
williamr@4
|
309 |
|
williamr@2
|
310 |
/**
|
williamr@2
|
311 |
@internalComponent
|
williamr@2
|
312 |
*/
|
williamr@2
|
313 |
void DoCreateL(TBool aFullCreate=ETrue);
|
williamr@2
|
314 |
// From CMdaImageUtility
|
williamr@2
|
315 |
virtual void DoClose();
|
williamr@2
|
316 |
private:
|
williamr@2
|
317 |
inline CMdaImageDataWriteUtilityPriv* Properties() const;
|
williamr@2
|
318 |
};
|
williamr@2
|
319 |
|
williamr@2
|
320 |
|
williamr@2
|
321 |
class CMdaImageFileToBitmapUtilityPriv;
|
williamr@2
|
322 |
/**
|
williamr@2
|
323 |
@publishedAll
|
williamr@2
|
324 |
@deprecated 7.0s - Replaced by Image Conversion library - use CImageDecoder::FileNewL()
|
williamr@2
|
325 |
|
williamr@2
|
326 |
Implements format conversion of a file based image to a bitmap.
|
williamr@2
|
327 |
|
williamr@2
|
328 |
This class has been deprecated in 7.0s, it's functionality is now part of the Image
|
williamr@2
|
329 |
Converter Library. For more information see CImageDecoder.
|
williamr@2
|
330 |
|
williamr@2
|
331 |
The class provides functions to create an instance of this conversion
|
williamr@2
|
332 |
utility and to open an existing image file. Conversion is performed
|
williamr@2
|
333 |
using the image conversion utility interface.
|
williamr@2
|
334 |
|
williamr@2
|
335 |
@since 5.0
|
williamr@2
|
336 |
@see CImageDecoder
|
williamr@2
|
337 |
*/
|
williamr@2
|
338 |
class CMdaImageFileToBitmapUtility : public CMdaImageDataReadUtility
|
williamr@2
|
339 |
{
|
williamr@2
|
340 |
public:
|
williamr@2
|
341 |
IMPORT_C static CMdaImageFileToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
|
williamr@2
|
342 |
IMPORT_C void OpenL(const TDesC& aFileName,TMdaClipFormat* aFormat = NULL,TMdaPackage* aCodec = NULL,TMdaPackage* aExtra = NULL);
|
williamr@2
|
343 |
private:
|
williamr@2
|
344 |
inline CMdaImageFileToBitmapUtilityPriv* Properties() const;
|
williamr@2
|
345 |
};
|
williamr@2
|
346 |
|
williamr@2
|
347 |
|
williamr@2
|
348 |
class CMdaImageDescToBitmapUtilityPriv;
|
williamr@2
|
349 |
|
williamr@2
|
350 |
/**
|
williamr@2
|
351 |
@publishedAll
|
williamr@2
|
352 |
@deprecated 7.0s - Replaced by Image Conversion library - use CImageDecoder::DataNewL()
|
williamr@2
|
353 |
|
williamr@2
|
354 |
Implements format conversion of a descriptor-based image to a bitmap.
|
williamr@2
|
355 |
|
williamr@2
|
356 |
This class has been deprecated in 7.0s, it's functionality is now part of the Image Converter
|
williamr@2
|
357 |
Library. For more information see CImageDecoder.
|
williamr@2
|
358 |
|
williamr@2
|
359 |
The class provides functions to create an instance of this conversion
|
williamr@2
|
360 |
utility and to open and prepare the image data.Conversion is performed
|
williamr@2
|
361 |
using the image conversion utility interface.
|
williamr@2
|
362 |
|
williamr@2
|
363 |
@since 5.0
|
williamr@2
|
364 |
@see CImageDecoder
|
williamr@2
|
365 |
*/
|
williamr@2
|
366 |
class CMdaImageDescToBitmapUtility : public CMdaImageDataReadUtility
|
williamr@2
|
367 |
{
|
williamr@2
|
368 |
public:
|
williamr@2
|
369 |
IMPORT_C static CMdaImageDescToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
|
williamr@2
|
370 |
IMPORT_C void OpenL(const TDesC8& aDescriptor,TMdaClipFormat* aFormat = NULL,TMdaPackage* aCodec = NULL,TMdaPackage* aExtra = NULL);
|
williamr@2
|
371 |
private:
|
williamr@2
|
372 |
inline CMdaImageDescToBitmapUtilityPriv* Properties() const;
|
williamr@2
|
373 |
};
|
williamr@2
|
374 |
|
williamr@2
|
375 |
|
williamr@2
|
376 |
class CMdaImageBitmapToFileUtilityPriv;
|
williamr@2
|
377 |
/**
|
williamr@2
|
378 |
@publishedAll
|
williamr@2
|
379 |
@deprecated
|
williamr@2
|
380 |
|
williamr@2
|
381 |
Implements format conversion of a bitmap to a file-based image.
|
williamr@2
|
382 |
|
williamr@2
|
383 |
Replaced by Image Conversion library - use CImageEncoder::FileNewL()
|
williamr@2
|
384 |
|
williamr@2
|
385 |
The class provides functions to create an instance of this conversion
|
williamr@2
|
386 |
utility and to create the file. Conversion is performed using the image
|
williamr@2
|
387 |
conversion utility interface.
|
williamr@2
|
388 |
|
williamr@2
|
389 |
@since 5.0
|
williamr@2
|
390 |
@see CImageEncoder::FileNewL()
|
williamr@2
|
391 |
*/
|
williamr@2
|
392 |
class CMdaImageBitmapToFileUtility : public CMdaImageDataWriteUtility
|
williamr@2
|
393 |
{
|
williamr@2
|
394 |
public:
|
williamr@2
|
395 |
IMPORT_C static CMdaImageBitmapToFileUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
|
williamr@2
|
396 |
IMPORT_C void CreateL(const TDesC& aFileName,TMdaClipFormat* aFormat,TMdaPackage* aCodec,TMdaPackage* aExtra);
|
williamr@2
|
397 |
private:
|
williamr@2
|
398 |
inline CMdaImageBitmapToFileUtilityPriv* Properties() const;
|
williamr@2
|
399 |
};
|
williamr@2
|
400 |
|
williamr@2
|
401 |
|
williamr@2
|
402 |
class CMdaImageBitmapToDescUtilityPriv;
|
williamr@2
|
403 |
|
williamr@2
|
404 |
/**
|
williamr@2
|
405 |
@publishedAll
|
williamr@2
|
406 |
@deprecated
|
williamr@2
|
407 |
|
williamr@2
|
408 |
This class has been deprecated in 7.0s, it's functionality is now part of the
|
williamr@2
|
409 |
Image Converter Library. For more information see CImageEncoder.
|
williamr@2
|
410 |
|
williamr@2
|
411 |
@see CImageEncoder::DataNewL
|
williamr@2
|
412 |
*/
|
williamr@2
|
413 |
class CMdaImageBitmapToDescUtility : public CMdaImageDataWriteUtility
|
williamr@2
|
414 |
{
|
williamr@2
|
415 |
public:
|
williamr@2
|
416 |
IMPORT_C static CMdaImageBitmapToDescUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);
|
williamr@2
|
417 |
IMPORT_C void CreateL(TDes8& aDescriptor,TMdaClipFormat* aFormat,TMdaPackage* aCodec,TMdaPackage* aExtra);
|
williamr@2
|
418 |
private:
|
williamr@2
|
419 |
inline CMdaImageBitmapToDescUtilityPriv* Properties() const;
|
williamr@2
|
420 |
};
|
williamr@2
|
421 |
|
williamr@2
|
422 |
|
williamr@2
|
423 |
class CMdaImageBitmapToBitmapUtilityPriv;
|
williamr@2
|
424 |
|
williamr@2
|
425 |
/**
|
williamr@2
|
426 |
@publishedAll
|
williamr@2
|
427 |
@deprecated
|
williamr@2
|
428 |
|
williamr@2
|
429 |
Implements bitmap to bitmap copying and colour depth conversion.
|
williamr@2
|
430 |
|
williamr@2
|
431 |
Replaced by Image Conversion library - use CImageEncoder::FileNewL()
|
williamr@2
|
432 |
|
williamr@2
|
433 |
@since 5.0
|
williamr@2
|
434 |
@see CImageEncoder::FileNewL()
|
williamr@2
|
435 |
*/
|
williamr@2
|
436 |
class CMdaImageBitmapToBitmapUtility : public CMdaImageUtility
|
williamr@2
|
437 |
{
|
williamr@2
|
438 |
friend class CMdaImageBitmapToBitmapUtilityPriv;
|
williamr@2
|
439 |
|
williamr@2
|
440 |
public:
|
williamr@2
|
441 |
IMPORT_C static CMdaImageBitmapToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver, CMdaServer* aServer = NULL);
|
williamr@2
|
442 |
IMPORT_C ~CMdaImageBitmapToBitmapUtility();
|
williamr@2
|
443 |
IMPORT_C void OpenL(CFbsBitmap& aBitmap);
|
williamr@2
|
444 |
// from CMdaImageUtility
|
williamr@2
|
445 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap, TInt aFrameNumber = 0);
|
williamr@2
|
446 |
IMPORT_C virtual void ConvertL(CFbsBitmap& aBitmap, CFbsBitmap& aMaskBitmap, TInt aFrameNumber = 0);
|
williamr@2
|
447 |
IMPORT_C virtual void CancelConvertL();
|
williamr@2
|
448 |
// From CActive
|
williamr@2
|
449 |
virtual void RunL();
|
williamr@2
|
450 |
virtual void DoCancel();
|
williamr@2
|
451 |
protected:
|
williamr@2
|
452 |
// from CMdaImageUtility
|
williamr@2
|
453 |
virtual void DoClose();
|
williamr@2
|
454 |
private:
|
williamr@2
|
455 |
inline CMdaImageBitmapToBitmapUtilityPriv* Properties() const;
|
williamr@2
|
456 |
};
|
williamr@2
|
457 |
|
williamr@2
|
458 |
|
williamr@2
|
459 |
|
williamr@2
|
460 |
class CMdaBitmapRotatorPriv;
|
williamr@2
|
461 |
/**
|
williamr@2
|
462 |
@publishedAll
|
williamr@2
|
463 |
@deprecated
|
williamr@2
|
464 |
|
williamr@2
|
465 |
Replaced by Image Conversion library - see CBitmapRotator
|
williamr@2
|
466 |
|
williamr@2
|
467 |
Rotates a bitmap.
|
williamr@2
|
468 |
|
williamr@2
|
469 |
The class offers a simple interface to perform bitmap rotations in
|
williamr@2
|
470 |
clockwise 90 degree increments. The target bitmap is resized as
|
williamr@2
|
471 |
necessary.
|
williamr@2
|
472 |
|
williamr@2
|
473 |
@since 5.0
|
williamr@2
|
474 |
|
williamr@2
|
475 |
@see
|
williamr@2
|
476 |
CBitmapRotator
|
williamr@2
|
477 |
*/
|
williamr@2
|
478 |
class CMdaBitmapRotator : public CBase
|
williamr@2
|
479 |
{
|
williamr@2
|
480 |
public:
|
williamr@2
|
481 |
/** Rotation angle.
|
williamr@2
|
482 |
*/
|
williamr@2
|
483 |
enum TRotationAngle
|
williamr@2
|
484 |
{
|
williamr@2
|
485 |
/** A clockwise rotation through 90 degrees.
|
williamr@2
|
486 |
*/
|
williamr@2
|
487 |
ERotation90DegreesClockwise,
|
williamr@2
|
488 |
/** A clockwise rotation through 180 degrees.
|
williamr@2
|
489 |
*/
|
williamr@2
|
490 |
ERotation180DegreesClockwise,
|
williamr@2
|
491 |
/** A clockwise rotation through 270 degrees.
|
williamr@2
|
492 |
*/
|
williamr@2
|
493 |
ERotation270DegreesClockwise,
|
williamr@2
|
494 |
/** The bitmap is mirrored about the horizontal axis.
|
williamr@2
|
495 |
*/
|
williamr@2
|
496 |
EMirrorFlipHorizontal,
|
williamr@2
|
497 |
/** The bitmap is mirrored about the vertical axis.
|
williamr@2
|
498 |
*/
|
williamr@2
|
499 |
EMirrorFlipVertical
|
williamr@2
|
500 |
};
|
williamr@2
|
501 |
public:
|
williamr@2
|
502 |
IMPORT_C static CMdaBitmapRotator* NewL();
|
williamr@2
|
503 |
IMPORT_C virtual ~CMdaBitmapRotator();
|
williamr@2
|
504 |
IMPORT_C void RotateL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aSrcBitmap,CFbsBitmap& aTgtBitmap,TRotationAngle aAngle);
|
williamr@2
|
505 |
IMPORT_C void RotateL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aBitmap,TRotationAngle aAngle);
|
williamr@2
|
506 |
IMPORT_C void CancelRotation();
|
williamr@2
|
507 |
private:
|
williamr@2
|
508 |
CMdaBitmapRotatorPriv* iProperties;
|
williamr@2
|
509 |
};
|
williamr@2
|
510 |
|
williamr@2
|
511 |
|
williamr@2
|
512 |
class CMdaBitmapScalerPriv;
|
williamr@2
|
513 |
|
williamr@2
|
514 |
/**
|
williamr@2
|
515 |
@publishedAll
|
williamr@2
|
516 |
@deprecated
|
williamr@2
|
517 |
|
williamr@2
|
518 |
Re-scales a bitmap.
|
williamr@2
|
519 |
|
williamr@2
|
520 |
Replaced by Image Conversion library - see CBitmapScaler
|
williamr@2
|
521 |
|
williamr@2
|
522 |
The class offers a simple interface to perform arbitrary re-scaling of
|
williamr@2
|
523 |
a bitmap.
|
williamr@2
|
524 |
|
williamr@2
|
525 |
@since 5.0
|
williamr@2
|
526 |
@see CBitmapScaler
|
williamr@2
|
527 |
*/
|
williamr@2
|
528 |
class CMdaBitmapScaler : public CBase
|
williamr@2
|
529 |
{
|
williamr@2
|
530 |
public:
|
williamr@2
|
531 |
IMPORT_C static CMdaBitmapScaler* NewL();
|
williamr@2
|
532 |
IMPORT_C virtual ~CMdaBitmapScaler();
|
williamr@2
|
533 |
IMPORT_C void ScaleL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aSrcBitmap,CFbsBitmap& aTgtBitmap,TBool aMaintainAspectRatio = ETrue);
|
williamr@2
|
534 |
IMPORT_C void ScaleL(MMdaImageUtilObserver& aObserver,CFbsBitmap& aBitmap,TSize aDestSize,TBool aMaintainAspectRatio = ETrue);
|
williamr@2
|
535 |
IMPORT_C void CancelScaling();
|
williamr@2
|
536 |
private:
|
williamr@2
|
537 |
CMdaBitmapScalerPriv* iProperties;
|
williamr@2
|
538 |
};
|
williamr@2
|
539 |
|
williamr@2
|
540 |
#endif
|
williamr@4
|
541 |
|