1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/iclexifimageframe.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,148 @@
1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This feature is documented in ICL_Design_EXIF.doc
1.18 +//
1.19 +//
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifndef ICLEXIFIMAGEFRAME_H
1.30 +#define ICLEXIFIMAGEFRAME_H
1.31 +
1.32 +#include <imageconversion.h>
1.33 +#include <icl/imageplugin.h>
1.34 +#include <iclexif.h>
1.35 +#include "imageframe.h"
1.36 +
1.37 +
1.38 +/**
1.39 +This class provides access to an extension of the EXIF JPEG decoder that supports
1.40 +decoding of JPEG images held either in files or in descriptors to a destination of type CImageFrame.
1.41 +
1.42 +This is an addition to the features provided by CJPEGExifDecoder.
1.43 +*/
1.44 +
1.45 +class CJPEGImageFrameDecoder : public CJPEGExifDecoder
1.46 + {
1.47 +public:
1.48 + IMPORT_C static CJPEGImageFrameDecoder* NewL();
1.49 + IMPORT_C ~CJPEGImageFrameDecoder();
1.50 +
1.51 + IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame);
1.52 + IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, CImageFrame& aDestFrame, TInt aFrameNumber);
1.53 + IMPORT_C void ContinueConvertFrame(TRequestStatus* aRequestStatus);
1.54 +
1.55 + IMPORT_C TBool RecommendedBufferSize(TUid aFormatCode, TInt& bufferSize);
1.56 + IMPORT_C TBool RecommendedBufferSize(TInt& bufferSize);
1.57 +
1.58 +protected:
1.59 + IMPORT_C CJPEGImageFrameDecoder();
1.60 + };
1.61 +
1.62 +/**
1.63 +This class provides access to an extension of the EXIF JPEG encoder that supports
1.64 +encoding JPEG images from a source of type CImageFrame to either a file or a descriptor.
1.65 +
1.66 +This is an addition to the features provided by CJPEGExifEncoder.
1.67 +*/
1.68 +
1.69 +class CJPEGImageFrameEncoder : public CJPEGExifEncoder
1.70 + {
1.71 +public:
1.72 + IMPORT_C static CJPEGImageFrameEncoder* NewL();
1.73 + IMPORT_C ~CJPEGImageFrameEncoder();
1.74 +
1.75 + IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame);
1.76 + IMPORT_C void ConvertFrame(TRequestStatus* aRequestStatus, const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
1.77 +
1.78 +protected:
1.79 + IMPORT_C CJPEGImageFrameEncoder();
1.80 + };
1.81 +
1.82 +
1.83 +/**
1.84 +This is the plugin API for Image Converter Library decoder plugins relating to CImageFrames.
1.85 +
1.86 +It is an extension of the ICL EXIF decoder plugin which provides a container for specific
1.87 +data required to decode a JPEG file or descriptor to a destination of type CImageFrame.
1.88 +*/
1.89 +class CJPEGImageFrameDecoderPlugin : public CJPEGExifDecoderPlugin
1.90 + {
1.91 +public:
1.92 + IMPORT_C ~CJPEGImageFrameDecoderPlugin();
1.93 + IMPORT_C CImageFrame& DstImageFrame();
1.94 + IMPORT_C TInt FrameNumber() const;
1.95 + IMPORT_C TUid FormatCode() const;
1.96 + IMPORT_C void SetRecommendedBufferSize(TInt aBufferSize);
1.97 +
1.98 + void SetConvertParameters(CImageFrame& aDestFrame, TInt aFrameNumber);
1.99 + void SetFormatCode(TUid aFormatCode);
1.100 + TInt RecommendedBufferSize();
1.101 +
1.102 +protected:
1.103 + IMPORT_C CJPEGImageFrameDecoderPlugin();
1.104 +
1.105 +private:
1.106 + // reserved for future expansion
1.107 + IMPORT_C virtual void Reserved1();
1.108 + IMPORT_C virtual void Reserved2();
1.109 + IMPORT_C virtual void Reserved3();
1.110 +
1.111 +private:
1.112 + CImageFrame* iDstImageFrame;
1.113 + TInt iFrameNumber;
1.114 + TUid iFormatCode;
1.115 + TInt iRecommendedBufferSize;
1.116 +
1.117 + TAny* iReserved;
1.118 + };
1.119 +
1.120 +/**
1.121 +This is the plugin API for Image Converter Library encoder plugins relating to CImageFrames.
1.122 +
1.123 +It is an extension of the ICL EXIF encoder plugin which provides a container for specific
1.124 +data required to encode image data from a source of type CImageFrame to a JPEG file or descriptor.
1.125 +*/
1.126 +class CJPEGImageFrameEncoderPlugin : public CJPEGExifEncoderPlugin
1.127 + {
1.128 +public:
1.129 + IMPORT_C ~CJPEGImageFrameEncoderPlugin();
1.130 + IMPORT_C const CImageFrame& SrcImageFrame() const;
1.131 + IMPORT_C const CFrameImageData& FrameImageData() const;
1.132 +
1.133 + void SetConvertParameters(const CImageFrame& aSrcFrame, const CFrameImageData* aFrameImageData);
1.134 +
1.135 +protected:
1.136 + IMPORT_C CJPEGImageFrameEncoderPlugin();
1.137 +
1.138 +private:
1.139 + // reserved for future expansion
1.140 + IMPORT_C virtual void Reserved1();
1.141 + IMPORT_C virtual void Reserved2();
1.142 + IMPORT_C virtual void Reserved3();
1.143 +
1.144 +private:
1.145 + const CImageFrame* iSrcImageFrame;
1.146 + const CFrameImageData* iFrameImageData;
1.147 +
1.148 + TAny* iReserved;
1.149 + };
1.150 +
1.151 +#endif // ICLEXIFIMAGEFRAME_H