epoc32/include/iclexifimageframe.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.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  @file
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef ICLEXIFIMAGEFRAME_H
    25 #define ICLEXIFIMAGEFRAME_H
    26 
    27 #include <imageconversion.h>
    28 #include <icl/imageplugin.h>
    29 #include <iclexif.h>
    30 #include "imageframe.h"
    31 
    32 
    33 /**
    34 This class provides access to an extension of the EXIF JPEG decoder that supports
    35 decoding of JPEG images held either in files or in descriptors to a destination of type CImageFrame.
    36 
    37 This is an addition to the features provided by CJPEGExifDecoder.
    38 */
    39 
    40 class CJPEGImageFrameDecoder : public CJPEGExifDecoder
    41 	{
    42 public:
    43 	IMPORT_C static CJPEGImageFrameDecoder* NewL();
    44 	IMPORT_C ~CJPEGImageFrameDecoder();
    45 
    46 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame);
    47 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame, TInt aFrameNumber);
    48 	IMPORT_C void ContinueConvertFrame(TRequestStatus* aRequestStatus);
    49 
    50 	IMPORT_C TBool RecommendedBufferSize(TUid aFormatCode, TInt& bufferSize);
    51 	IMPORT_C TBool RecommendedBufferSize(TInt& bufferSize);
    52 
    53 protected:
    54 	IMPORT_C CJPEGImageFrameDecoder();
    55 	};
    56 
    57 /**
    58 This class provides access to an extension of the EXIF JPEG encoder that supports
    59 encoding JPEG images from a source of type CImageFrame to either a file or a descriptor. 
    60 
    61 This is an addition to the features provided by CJPEGExifEncoder.
    62 */
    63 
    64 class CJPEGImageFrameEncoder : public CJPEGExifEncoder
    65 	{
    66 public:
    67 	IMPORT_C static CJPEGImageFrameEncoder* NewL();
    68 	IMPORT_C ~CJPEGImageFrameEncoder();
    69 
    70 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame);
    71 	IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
    72 
    73 protected:
    74 	IMPORT_C CJPEGImageFrameEncoder();
    75 	};
    76 	
    77 
    78 /**
    79 This is the plugin API for Image Converter Library decoder plugins relating to CImageFrames.
    80 
    81 It is an extension of the ICL EXIF decoder plugin which provides a container for specific
    82 data required to decode a JPEG file or descriptor to a destination of type CImageFrame.
    83 */
    84 class CJPEGImageFrameDecoderPlugin : public CJPEGExifDecoderPlugin
    85 	{
    86 public:
    87 	IMPORT_C ~CJPEGImageFrameDecoderPlugin();
    88 	IMPORT_C CImageFrame& DstImageFrame();
    89 	IMPORT_C TInt FrameNumber() const;
    90 	IMPORT_C TUid FormatCode() const;
    91 	IMPORT_C void SetRecommendedBufferSize(TInt aBufferSize);
    92 
    93 	void SetConvertParameters(CImageFrame& aDestFrame, TInt aFrameNumber);
    94 	void SetFormatCode(TUid aFormatCode);
    95 	TInt RecommendedBufferSize();
    96 
    97 protected:
    98 	IMPORT_C CJPEGImageFrameDecoderPlugin();
    99 
   100 private:
   101 	// reserved for future expansion
   102 	IMPORT_C virtual void Reserved1();
   103 	IMPORT_C virtual void Reserved2();
   104 	IMPORT_C virtual void Reserved3();
   105 	
   106 private:
   107 	CImageFrame* iDstImageFrame;
   108 	TInt iFrameNumber;
   109 	TUid iFormatCode;		
   110 	TInt iRecommendedBufferSize;
   111 
   112 	TAny* iReserved;
   113 	};
   114 
   115 /**
   116 This is the plugin API for Image Converter Library encoder plugins relating to CImageFrames. 
   117 
   118 It is an extension of the ICL EXIF encoder plugin which provides a container for specific
   119 data required to encode image data from a source of type CImageFrame to a JPEG file or descriptor.
   120 */
   121 class CJPEGImageFrameEncoderPlugin : public CJPEGExifEncoderPlugin
   122 	{
   123 public:
   124 	IMPORT_C ~CJPEGImageFrameEncoderPlugin();
   125 	IMPORT_C const CImageFrame& SrcImageFrame() const;
   126 	IMPORT_C const CFrameImageData& FrameImageData() const;
   127 
   128 	void SetConvertParameters(const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
   129 
   130 protected:
   131 	IMPORT_C CJPEGImageFrameEncoderPlugin();
   132 
   133 private:
   134 	// reserved for future expansion
   135 	IMPORT_C virtual void Reserved1();
   136 	IMPORT_C virtual void Reserved2();
   137 	IMPORT_C virtual void Reserved3();
   138 		
   139 private:
   140 	const CImageFrame* iSrcImageFrame;
   141 	const CFrameImageData* iFrameImageData;
   142 
   143 	TAny* iReserved;
   144 	};
   145 
   146 #endif // ICLEXIFIMAGEFRAME_H