epoc32/include/iclexifimageframe.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // This feature is documented in ICL_Design_EXIF.doc
    15 // 
    16 //
    17 
    18 
    19 
    20 /**
    21  @file
    22  @publishedAll
    23  @released
    24 */
    25 
    26 #ifndef ICLEXIFIMAGEFRAME_H
    27 #define ICLEXIFIMAGEFRAME_H
    28 
    29 #include <imageconversion.h>
    30 #include <icl/imageplugin.h>
    31 #include <iclexif.h>
    32 #include "imageframe.h"
    33 
    34 
    35 /**
    36 This class provides access to an extension of the EXIF JPEG decoder that supports
    37 decoding of JPEG images held either in files or in descriptors to a destination of type CImageFrame.
    38 
    39 This is an addition to the features provided by CJPEGExifDecoder.
    40 */
    41 
    42 class CJPEGImageFrameDecoder : public CJPEGExifDecoder
    43 	{
    44 public:
    45 	IMPORT_C static CJPEGImageFrameDecoder* NewL();
    46 	IMPORT_C ~CJPEGImageFrameDecoder();
    47 
    48 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame);
    49 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame, TInt aFrameNumber);
    50 	IMPORT_C void ContinueConvertFrame(TRequestStatus* aRequestStatus);
    51 
    52 	IMPORT_C TBool RecommendedBufferSize(TUid aFormatCode, TInt& bufferSize);
    53 	IMPORT_C TBool RecommendedBufferSize(TInt& bufferSize);
    54 
    55 protected:
    56 	IMPORT_C CJPEGImageFrameDecoder();
    57 	};
    58 
    59 /**
    60 This class provides access to an extension of the EXIF JPEG encoder that supports
    61 encoding JPEG images from a source of type CImageFrame to either a file or a descriptor. 
    62 
    63 This is an addition to the features provided by CJPEGExifEncoder.
    64 */
    65 
    66 class CJPEGImageFrameEncoder : public CJPEGExifEncoder
    67 	{
    68 public:
    69 	IMPORT_C static CJPEGImageFrameEncoder* NewL();
    70 	IMPORT_C ~CJPEGImageFrameEncoder();
    71 
    72 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame);
    73 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
    74 
    75 protected:
    76 	IMPORT_C CJPEGImageFrameEncoder();
    77 	};
    78 	
    79 
    80 /**
    81 This is the plugin API for Image Converter Library decoder plugins relating to CImageFrames.
    82 
    83 It is an extension of the ICL EXIF decoder plugin which provides a container for specific
    84 data required to decode a JPEG file or descriptor to a destination of type CImageFrame.
    85 */
    86 class CJPEGImageFrameDecoderPlugin : public CJPEGExifDecoderPlugin
    87 	{
    88 public:
    89 	IMPORT_C ~CJPEGImageFrameDecoderPlugin();
    90 	IMPORT_C CImageFrame& DstImageFrame();
    91 	IMPORT_C TInt FrameNumber() const;
    92 	IMPORT_C TUid FormatCode() const;
    93 	IMPORT_C void SetRecommendedBufferSize(TInt aBufferSize);
    94 
    95 	void SetConvertParameters(CImageFrame& aDestFrame, TInt aFrameNumber);
    96 	void SetFormatCode(TUid aFormatCode);
    97 	TInt RecommendedBufferSize();
    98 
    99 protected:
   100 	IMPORT_C CJPEGImageFrameDecoderPlugin();
   101 
   102 private:
   103 	// reserved for future expansion
   104 	IMPORT_C virtual void Reserved1();
   105 	IMPORT_C virtual void Reserved2();
   106 	IMPORT_C virtual void Reserved3();
   107 	
   108 private:
   109 	CImageFrame* iDstImageFrame;
   110 	TInt iFrameNumber;
   111 	TUid iFormatCode;		
   112 	TInt iRecommendedBufferSize;
   113 
   114 	TAny* iReserved;
   115 	};
   116 
   117 /**
   118 This is the plugin API for Image Converter Library encoder plugins relating to CImageFrames. 
   119 
   120 It is an extension of the ICL EXIF encoder plugin which provides a container for specific
   121 data required to encode image data from a source of type CImageFrame to a JPEG file or descriptor.
   122 */
   123 class CJPEGImageFrameEncoderPlugin : public CJPEGExifEncoderPlugin
   124 	{
   125 public:
   126 	IMPORT_C ~CJPEGImageFrameEncoderPlugin();
   127 	IMPORT_C const CImageFrame& SrcImageFrame() const;
   128 	IMPORT_C const CFrameImageData& FrameImageData() const;
   129 
   130 	void SetConvertParameters(const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
   131 
   132 protected:
   133 	IMPORT_C CJPEGImageFrameEncoderPlugin();
   134 
   135 private:
   136 	// reserved for future expansion
   137 	IMPORT_C virtual void Reserved1();
   138 	IMPORT_C virtual void Reserved2();
   139 	IMPORT_C virtual void Reserved3();
   140 		
   141 private:
   142 	const CImageFrame* iSrcImageFrame;
   143 	const CFrameImageData* iFrameImageData;
   144 
   145 	TAny* iReserved;
   146 	};
   147 
   148 #endif // ICLEXIFIMAGEFRAME_H