Symbian3/SDK/Source/GUID-C0B39D73-0A3C-5289-A774-7BE590037404.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-C0B39D73-0A3C-5289-A774-7BE590037404"><title>Bitmap Transform Library Overview </title><shortdesc>This document introduces you to the Bitmap Transform library. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Purpose</title> <p>Allows images to be scaled or rotated. of course the image must be a bitmap, either the actual source file or after converting from some other format to a <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object. </p> <p><b>Bitmap Transform Library Details</b> </p> <p>The DLL that provides the functionality and the library to which your code must link is identified below. </p> <table id="GUID-486D0170-3922-54FC-AFD9-4B3F1A632106"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>DLL</entry> <entry>LIB</entry> <entry>Short Description</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-157D00CF-72DB-3DD1-843F-64F5397EEA11.dita"><apiname>bitmaptransforms.dll</apiname></xref>  </p> </entry> <entry><p> <xref href="GUID-2DB83568-2E1E-3DED-80A4-FA215B935E7B.dita"><apiname>bitmaptransforms.lib</apiname></xref>  </p> </entry> <entry><p>These files are used for implementing Bitmap Transform operation. But these files are not used for the enhanced functionality of encoder / decoder during bitmap transformation. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Architectural Relationship</title> <p>Bitmap Transform is a member of the Imaging Frameworkss component. </p> </section> <section><title>Key Bitmap Transform Library Classes</title> <p>The bitmap transform classes <xref href="GUID-D0835677-6790-3038-8893-83E7186F47E7.dita"><apiname>CBitmapRotator</apiname></xref> and <xref href="GUID-2008D827-A84A-3170-A8BD-86002BA37979.dita"><apiname>CBitmapScaler</apiname></xref> provide image rotation and scaling as explained below: </p> <ul><li id="GUID-1CA4B6CC-038B-5622-9801-6D0DF97D657A"><p> <b>Image Rotation:</b>  </p> <p> <xref href="GUID-D0835677-6790-3038-8893-83E7186F47E7.dita#GUID-D0835677-6790-3038-8893-83E7186F47E7/GUID-7D85DD3C-2692-3FBE-8E23-F991CEF83CE3"><apiname>CBitmapRotator::Rotate()</apiname></xref> rotates the image stored in a <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object according to the <xref href="GUID-D0835677-6790-3038-8893-83E7186F47E7.dita#GUID-D0835677-6790-3038-8893-83E7186F47E7/GUID-D89261A3-D59C-38BC-BF55-B0C758AC9C85"><apiname>CBitmapRotator::TRotationAngle</apiname></xref> selected and optionally either stores the resulting image in a new <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> or replaces the original. </p> </li> <li id="GUID-3006F5B3-A25D-5AA3-927C-7AF64C1721EC"><p> <b>Image Scaling:</b>  </p> <p> <xref href="GUID-2008D827-A84A-3170-A8BD-86002BA37979.dita"><apiname>CBitmapScaler</apiname></xref> provides scaling for the image stored in <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object according to the size and <xref href="GUID-2008D827-A84A-3170-A8BD-86002BA37979.dita#GUID-2008D827-A84A-3170-A8BD-86002BA37979/GUID-707C9EE8-2FEA-3A21-9E8F-FC947BA51B15"><apiname>CBitmapScaler::TQualityAlgorithm</apiname></xref> quality selected and optionally either stores the resulting image in a new <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> or replaces the original. </p> </li> </ul> <p>The scale and rotate actions are asynchronous operations that use the standard system of taking a pointer to a <xref href="GUID-E0B34F3E-D4C4-3232-B8B1-7DB35B454646.dita"><apiname>TRequestStatus</apiname></xref> object, that is signalled on completion of the requested action. It is assumed that the client application or calling DLL will hold the <codeph>TRequestStatus</codeph> values within active objects. The bitmap transform classes also make extensive use internally of active objects to provide asynchronous behaviour. As with any use of an active object it is necessary to have an active scheduler present in the same thread as the application making use of the object. </p> <p> <b>Note:</b> Some more enhanced features are supported by the encoder and the decoder during the bitmap transformation, they are scaling, rotation / mirroring, cropping. For more information see, <xref href="GUID-E6692CDA-9E24-57AE-9BC2-14D68D6480C3.dita">Tutorial About Enhanced Features for Encoder and Decoder</xref>. </p> </section> <section><title>Description</title> <p>Bitmap Transform enables two operations, rotating and scaling images. </p> </section> <section><title>Rotate images</title> <p>This allows an image to be rotated as discussed below. </p> <p>The application must supply the following details to rotate an image: </p> <ul><li id="GUID-5A550A36-6CEA-5AA4-9D0C-6A841229CD7A"><p>A <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object representing the image to be rotated, flipped or mirrored </p> </li> <li id="GUID-E55D1374-C613-5BE8-AA4F-04A077987868"><p>Optionally a second <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object representing the destination image if the original is to be maintained or for whatever reason cannot be modified </p> </li> <li id="GUID-772E3CC4-FF43-5B37-A899-26C7A6F1DD15"><p>The rotation angle (<xref href="GUID-D0835677-6790-3038-8893-83E7186F47E7.dita#GUID-D0835677-6790-3038-8893-83E7186F47E7/GUID-D89261A3-D59C-38BC-BF55-B0C758AC9C85"><apiname>CBitmapRotator::TRotationAngle</apiname></xref>) </p> <p>There are five possible rotation angles: </p> <ul><li id="GUID-E027E5C4-98D7-5D96-836D-1AFDA1AD38D5"><p>90 degrees (<xref href="GUID-047C4788-75EA-3BFC-B115-EFC93F44CDDC.dita"><apiname>ERotation90DegreesClockwise</apiname></xref>) </p> </li> <li id="GUID-81CBDE6F-3F2B-570F-ADC9-5F7A5230E8AD"><p>180 degrees (<xref href="GUID-D1D029ED-36D0-3984-922D-89F4F837BD80.dita"><apiname>ERotation180DegreesClockwise</apiname></xref>) </p> </li> <li id="GUID-CB912954-E99C-5993-9F88-54D22DB9BF62"><p>270 degrees (<xref href="GUID-FB621014-25BD-32B7-A1F7-EC335CB003DF.dita"><apiname>ERotation270DegreesClockwise</apiname></xref>) </p> </li> <li id="GUID-573E5903-2C16-5623-8B15-3BC4052D9014"><p>Horizontal Flip (<xref href="GUID-8656A4FF-9357-3460-AD53-7B59ACDACA52.dita"><apiname>EMirrorHorizontalAxis</apiname></xref>) </p> </li> <li id="GUID-E36C28A4-95F8-5FB2-9AE2-BB3482C35EAA"><p>Vertical Flip (<xref href="GUID-FCF62F65-CCE4-31A7-AC3C-6D516895C43A.dita"><apiname>EMirrorVerticalAxis</apiname></xref>) </p> </li> </ul> </li> </ul> </section> <section><title>Scale Images</title> <p>This allows an image to be scaled or resized. </p> <p>The application must supply the following details for a scaling operation: </p> <ul><li id="GUID-E5C8F705-BC09-5C51-BB30-80A7860EE725"><p>A <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object representing the image to be scaled </p> </li> <li id="GUID-F7C2CD3B-3BB2-5ED6-9A16-F5DF4AF55622"><p>Optionally a second <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object representing the destination image if the original is to be maintained or for whatever reason cannot be modified. </p> </li> <li id="GUID-C4C4B1CD-2028-5E4F-8100-37C25DADAFAB"><p>The target size (<xref href="GUID-938244B2-5E1A-39F7-8ACA-E6DE4C44A313.dita"><apiname>TSize</apiname></xref>) </p> <p>The size parameter is expressed as a width and height in pixels. </p> </li> <li id="GUID-1E74F97F-3AFF-5B1A-BE54-92E40AB0C219"><p>Aspect ratio indicator </p> <p>The aspect ratio is maintained by default (<codeph>TBool aMaintainAspectRatio =
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    13
                ETrue</codeph>). Disabling this (<codeph>aMaintainAspectRatio
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    14
                = EFalse</codeph>) may result in the image stretching in one direction. </p> </li> <li id="GUID-61522724-8966-5C3B-825E-D2A14EE00C30"><p>A scaling quality and speed preference (<xref href="GUID-2008D827-A84A-3170-A8BD-86002BA37979.dita#GUID-2008D827-A84A-3170-A8BD-86002BA37979/GUID-707C9EE8-2FEA-3A21-9E8F-FC947BA51B15"><apiname>CBitmapScaler::TQualityAlgorithm</apiname></xref>) </p> <p>There are three scaling settings available representing the image quality and scaling speed, they are: </p> <ul><li id="GUID-AF720659-AC70-53C2-B411-35763717B18C"><p>Minimum (<xref href="GUID-D84A4C9C-6E38-37A8-A02A-7AAB0E4FA085.dita"><apiname>EMinimumQuality</apiname></xref>) </p> </li> <li id="GUID-9134876B-CB13-5D44-AF5E-05BC6CCC3928"><p>Medium (<xref href="GUID-AE7AAC9E-53AB-32A9-9243-94A207513DE7.dita"><apiname>EMediumQuality</apiname></xref>) </p> </li> <li id="GUID-02E190FA-AE15-5EF7-A310-4586275698DF"><p>Maximum (<xref href="GUID-5C0F3148-239E-3ED1-9D7A-BD16D2A2B78F.dita"><apiname>EMaximumQuality</apiname></xref>) </p> </li> </ul> </li> </ul> <p>To rotate or scale an image, it must be decoded and stored in a <xref href="GUID-683A1D42-2764-3EB7-BD19-9E12559199AB.dita"><apiname>CFbsBitmap</apiname></xref> object. Some decoder supports enhanced functionality in transformation. For more information see, <xref href="GUID-E6692CDA-9E24-57AE-9BC2-14D68D6480C3.dita">Tutorial About Enhanced Features for Encoder and Decoder</xref>. </p> </section> <section><title>Using Bitmap Transform</title> <p>Bitmap Transform is used for the following: </p> <ul><li id="GUID-F1A26399-C0E1-51EE-A55A-3F10FC550013"><p>Rotating and mirroring bitmap images. </p> </li> <li id="GUID-2EF44CB5-D9E8-519F-B3E9-429851FC6B9E"><p>Scaling and resizing bitmap images. </p> </li> </ul> </section> </conbody><related-links><link href="GUID-88091838-03FC-550F-9A3D-DA70907EF955.dita"><linktext>Imaging Frameworks overview</linktext> </link> <link href="GUID-9D6C086F-7621-5522-AE0B-81CBD5E99125.dita"><linktext>Bitmap Transform Library Guide</linktext> </link> <link href="GUID-E6692CDA-9E24-57AE-9BC2-14D68D6480C3.dita"><linktext> Enhanced Features for Encoder
89d6a7a84779 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
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    15
                and Decoder Tutorial</linktext> </link> </related-links></concept>