imaging/imagingplugins/codecs/BMPCodec/BMPConvert.h
changeset 0 5752a19fdefe
equal deleted inserted replaced
-1:000000000000 0:5752a19fdefe
       
     1 // Copyright (c) 1999-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 //
       
    15 
       
    16 #ifndef __BMPCONVERT_H__
       
    17 #define __BMPCONVERT_H__
       
    18 
       
    19 #include <icl/imageplugin.h>
       
    20 #include "BMPCodec.h"
       
    21 #include "BMPFormat.h"
       
    22 
       
    23 class CBmpReadCodec;
       
    24 class CFrameInfoStrings;
       
    25 class CBmpDecoder : public CImageDecoderPlugin
       
    26 	{
       
    27 public:
       
    28 	static CBmpDecoder* NewL();
       
    29 	~CBmpDecoder();
       
    30 	//From CImageEncoder
       
    31 	void ImageType(TInt aFrameNumber, TUid& aImageType, TUid& aImageSubType) const; 
       
    32 	CFrameInfoStrings* FrameInfoStringsL(RFs& aFs, TInt aFrameNumber);
       
    33 
       
    34 private:
       
    35 	CBmpDecoder();
       
    36 	//From CImageEncoderPlugin
       
    37 	void ScanDataL();
       
    38 	void ReadFormatL();
       
    39 
       
    40 private:
       
    41 	TRgb iPalette[KBmpMaxPaletteEntries];
       
    42 	TBmpHeader iBitmapHeader;
       
    43 	};
       
    44 
       
    45 
       
    46 // Bmp encoder
       
    47 class CBmpEncoder : public CImageEncoderPlugin
       
    48 	{
       
    49 public:
       
    50 	static CBmpEncoder* NewL();
       
    51 	~CBmpEncoder();
       
    52 protected:
       
    53 	//From CImageEncoder
       
    54 	void Cleanup(); 
       
    55 private:
       
    56 	CBmpEncoder();
       
    57 	//From CImageEncoderPlugin
       
    58 	void UpdateHeaderL();
       
    59 	void PrepareEncoderL(const CFrameImageData* aFrameImageData); 
       
    60 private:
       
    61 	HBufC8* iReadBuffer;
       
    62 	TBmpHeader iBitmapHeader;
       
    63 	TRgb iPalette[KBmpMaxPaletteEntries];
       
    64 	};
       
    65 
       
    66 #endif // __BMPCONVERT_H__