Symbian3/SDK/Source/GUID-7594A012-166F-5F10-A3ED-256465B4623E-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-7594A012-166F-5F10-A3ED-256465B4623E-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1" xml:lang="en"><title>ImageConv:
Image Converter Library example code</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Description</title> <p> <filepath>ImageConv</filepath> demonstrates
the Image Converter Library API. It shows how to: </p> <ul>
<li id="GUID-55E51EE6-7A9D-53BB-91A7-08A5E9F23287-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-1-3-1"><p>read standard graphics
formats (such as <filepath>.bmp</filepath> or <filepath>.gif</filepath>) into <codeph>CFbsBitmap</codeph> objects,
from where they can be manipulated and rendered to the screen </p> </li>
<li id="GUID-B01F3820-4E04-5841-92FD-400F3B0095C4-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-1-3-2"><p>save <codeph>CFbsBitmap</codeph> objects
as files, using a number of formats </p> </li>
<li id="GUID-56B18DF3-2125-570E-8C33-7FA334821BC1-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-1-3-3"><p>rotate, flip, and zoom
images </p> </li>
</ul> <p>The Image Converter API is called by an engine class <codeph>CImageHandler</codeph>.
The UI class, <codeph>CImageAppUi</codeph>, supplies a dialog that allows
the user to choose a particular frame from a multi-frame image (such as an
animated .gif), and a dialog that allows the user to save the current image
in a particular format. </p> </section>
<section><title>Download</title> <p>Click on the following link to download
the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-dc5f26e3-7c69-43ef-b3f1-c62469891d0d.zip" scope="external"> ImageConv.zip file</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-dc5f26e3-7c69-43ef-b3f1-c62469891d0d.html" scope="peer">browse </xref>to view the example code. </p> </section>
<section><title>Class summary</title><p> <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap </apiname></xref>  <xref href="GUID-5D8DD5A8-1913-3B3F-A4D9-71C7834DA041.dita"><apiname>RImageTypeDescriptionArray </apiname></xref>  <xref href="GUID-A1C5A447-6A11-35ED-BF4C-27525D775CC1.dita"><apiname>TFileSaveDialogOptions </apiname></xref> <xref href="GUID-0AEE5955-C530-35F1-A904-69183331B294.dita"><apiname>CWindowGc </apiname></xref> <xref href="GUID-7A6A6EFD-F0DB-3747-9418-A423A613250A.dita"><apiname> TFrameInfo </apiname></xref> <xref href="GUID-F87784F6-3736-30F0-8F4D-358E95553263.dita"><apiname>MImageHandlerCallback </apiname></xref>  <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs </apiname></xref> <xref href="GUID-2008D827-A84A-3170-A8BD-86002BA37979.dita"><apiname>CBitmapScaler </apiname></xref> <xref href="GUID-D0835677-6790-3038-8893-83E7186F47E7.dita"><apiname> CBitmapRotator </apiname></xref> </p></section>
<section><title>Build</title> <p>The source code for this example application
can be found in the directory: </p> <p> <filepath>examples\MultiMedia\ImageConv\</filepath>  </p> <p>It
may be in the directory in which you installed the Symbian platform, or it
may be in <filepath>src\common\developerlibrary\</filepath>. It includes the
two project files needed for building: <filepath>bld.inf</filepath> and the <filepath>.mmp</filepath> file. </p> <p><xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">The Symbian build process</xref> describes
how to build this application. For the emulator, an application called <filepath>ImageConv.exe</filepath> is
created in <filepath>epoc32\release\winscw\&lt;udeb or urel&gt;\</filepath>. </p> </section>
<section><title>Usage</title> <ol id="GUID-90CDEC0A-390D-5AD0-BBE6-D1F493B5743B-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2">
<li id="GUID-EEA05011-4252-56CC-A26D-B271CF77876F-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-1"><p>Launch the emulator: </p> <p> <filepath>\epoc32\release\winscw\&lt;urel
or udeb&gt;\EPOC.EXE</filepath>. </p> </li>
<li id="GUID-3DFED3A0-2F2A-5F82-9AEE-6274E22B7C24-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-2"><p>Click on <systemoutput>IMAGECONV</systemoutput> to
run the application. If using the <i>TechView</i> emulator, this will be in
the <i>Extras</i> menu. </p> </li>
<li id="GUID-DD60B267-1B5A-5DB0-988F-ABC812F90D09-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-3"><p>A collection of sample
files of different formats is included. See the <filepath>readme.txt</filepath> in <filepath>ImageConv\samples\</filepath> for
notes on the characteristics of each sample file. </p> </li>
<li id="GUID-00E564F7-101B-5E70-A1F2-C19A46D9EBFE-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4"><p>Commands are given to
the example through its File and Image menus. The commands are: </p> <ul>
<li id="GUID-BA1E30DD-2E07-5E7E-9A10-24FB0EFA8D29-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-1"><p> Open file: opens a
graphics file and converts it into a displayable <codeph>CFbsBitmap</codeph> object </p> </li>
<li id="GUID-C25672B9-A1F0-568B-9199-B84D9E6F67FD-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-2"><p> Save as: saves the
current bitmap (<codeph>CFbsBitmap</codeph> object) in a selectable format </p> </li>
<li id="GUID-3DD92262-C30D-5FCE-9EF0-4117DC9E4BBB-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-3"><p> Zoom in and Zoom out:
zooms the current image </p> </li>
<li id="GUID-007F9B35-D47D-569B-B995-ADAF8F3C265E-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-4"><p> Rotate clockwise and
Rotate                      anti-clockwise: rotates the current image </p> </li>
<li id="GUID-F5DD31E4-0FCB-514C-A93C-B0D00A403074-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-5"><p> Mirror produces a mirror
image </p> </li>
<li id="GUID-4A9C8D09-424C-57C5-A344-A3208ABFB0F4-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-6"><p> Flip turns the image
upside-down </p> </li>
<li id="GUID-1218EE55-E825-524F-9230-C8059CD18007-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-7"><p> Refresh: reloads the
image from file </p> </li>
<li id="GUID-C8F94BBB-E5A2-50F9-B521-1A042B7BB306-GENID-1-6-1-17-1-1-5-1-6-1-5-1-4-1-2-5-2-4-2-8"><p> Select frame: selects
a frame from a multi-frame image </p> </li>
</ul> </li>
</ol> </section>
</conbody></concept>