• 大小: 0.04M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-18
  • 语言: C/C++
  • 标签: 图片合成  MAP  IT  bi  源码  

资源简介

制作图片合成的小程序

资源截图

代码片段和文件信息

/*
* ============================================================================
*  Name     : CImageSaverEngine from ImageSaverEngine.cpp
*  Part of  : ImageSaver
*  Created  : 30.01.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include 

#include “ImageSaverEngine.h“


// ================= MEMBER FUNCTIONS =======================

// Two-phased constructor.
CImageSaverEngine* CImageSaverEngine::NewL(MObserver& aObserver)
    {
    CImageSaverEngine* self = new(ELeave) CImageSaverEngine(aObserver);
    CleanupStack::PushL( self );
    self->ConstructL();
    CleanupStack::Pop();
    return self; 
    }

// destructor
CImageSaverEngine::~CImageSaverEngine()
    {
    DoCancel();
    }

// constructor
CImageSaverEngine::CImageSaverEngine(MObserver& aObserver ) : 
    CActive(EPriorityStandard) iObserver(aObserver)
    {
    }

// EPOC default constructor can leave.
void CImageSaverEngine::ConstructL()
    {
    CActiveScheduler::Add( this );
    }

void CImageSaverEngine::RunL()
    {
    iObserver.OnCompleteL(iStatus.Int());
    DoCancel();
    }

void CImageSaverEngine::DoCancel()
    {
    if(iImageEncoder!=NULL)
        {
        iImageEncoder->Cancel();
        }
    delete iImageEncoder;
    iImageEncoder = NULL;

    delete iframeImageData;
    iframeImageData = NULL;
    }

void CImageSaverEngine::SaveL(CFbsBitmap& aBitmap const TFileName& aFileName)
    {
    DoCancel();
    _LIT8(KJpgMime “image/jpeg“);
    iImageEncoder = CImageEncoder::FileNewL(CCoeEnv::Static()->FsSession() aFileName KJpgMime());

    // Setup the jpg saving information that is required.
    TJpegImageData* jpegImageData = new (ELeave) TJpegImageData;
    CleanupStack::PushL(jpegImageData);

    // Set specific format data
    jpegImageData->iQualityFactor = 95;
    jpegImageData->iSampleScheme = TJpegImageData::EColor444;

    iframeImageData = CframeImageData::NewL();

    // Ownership passed to iframeImageData after AppendImageData
    User::LeaveIfError(iframeImageData->AppendImageData(jpegImageData));
    CleanupStack::Pop(jpegImageData);

    // Convert
    iImageEncoder->Convert(&iStatus aBitmap iframeImageData);
    SetActive();
    }

// End of File  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1369  2009-03-30 18:32  CreatBitmap\.cdtproject

     文件        736  2009-03-30 18:32  CreatBitmap\.project

     文件       1100  2009-03-30 18:32  CreatBitmap\.settings\.carbide_build_settings

     文件        106  2009-03-30 18:32  CreatBitmap\.settings\org.eclipse.cdt.core.prefs

     文件       3016  2009-03-27 10:43  CreatBitmap\aif\context_pane_icon.bmp

     文件        414  2009-03-27 10:43  CreatBitmap\aif\context_pane_icon_mask.bmp

     文件        475  2009-03-27 10:43  CreatBitmap\aif\CreatBitmapaif.rss

     文件       2356  2009-03-27 10:43  CreatBitmap\aif\list_icon.bmp

     文件        294  2009-03-27 10:43  CreatBitmap\aif\list_icon_mask.bmp

    ..A.SH.      8704  2009-03-27 10:54  CreatBitmap\aif\Thumbs.db

     文件      50454  2009-03-30 15:02  CreatBitmap\data\chiqingzheng.bmp

     文件       2770  2009-03-31 10:58  CreatBitmap\data\CreatBitmap.rss

     文件        471  2009-03-27 10:43  CreatBitmap\data\CreatBitmap_caption.rss

     文件       6966  2006-01-30 21:32  CreatBitmap\data\Face.bmp

     文件        446  2006-01-30 23:35  CreatBitmap\data\FaceMask.bmp

     文件       1654  2009-03-31 09:55  CreatBitmap\data\xu.bmp

     文件        335  2009-03-27 10:53  CreatBitmap\group\ABLD.BAT

     文件        452  2009-03-27 10:43  CreatBitmap\group\bld.inf

     文件       1305  2009-03-31 17:03  CreatBitmap\group\CreatBitmap.mmp

     文件        818  2009-03-27 10:43  CreatBitmap\help\build_help.mk

     文件        548  2009-03-27 10:43  CreatBitmap\help\CreatBitmap.cshlp

     文件       3066  2009-03-31 18:15  CreatBitmap\help\CreatBitmap.hlp

     文件        218  2009-03-31 18:15  CreatBitmap\help\CreatBitmap.hlp.hrh

     文件        491  2009-03-27 10:43  CreatBitmap\help\CreatBitmap.xml

     文件        660  2009-03-27 10:43  CreatBitmap\help\Custom.xml

     文件       1341  2009-03-31 18:15  CreatBitmap\help\temp\CreatBitmap.cshlp.xml

     文件        616  2009-03-27 10:43  CreatBitmap\inc\CreatBitmap.hrh

     文件       1029  2009-03-31 10:57  CreatBitmap\inc\CreatBitmap.loc

     文件       1019  2009-03-31 10:57  CreatBitmap\inc\CreatBitmap.loc.bak

     文件       1093  2009-03-27 10:43  CreatBitmap\inc\CreatBitmapApp.h

............此处省略24个文件信息

评论

共有 条评论