|
API Guide Home (Online version only) |
![]() |
00001 /******************************************************************************* 00002 * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries. 00003 * All rights reserved. 00004 ******************************************************************************/ 00005 /** 00006 * @defgroup Imaging Imaging Library 00007 * @brief This library provides support for image drawing and manipulation on 00008 * Treo 600 devices. 00009 * 00010 * Applications can use this library to draw JPEG images on the screen or create 00011 * thumbnails and such on the Treo 600 devices. This library also allows some 00012 * interaction with the camera within the 3rd party application itself. For the 00013 * newer devices, developers should try to use palmOne Photo Library before using 00014 * the Image Library. 00015 * 00016 * palmOne Photo Library allows better integration with the built-in Media application 00017 * and storing image on the device. Developers who would like to use this library 00018 * should first check the version of the library and then make the appropriate API 00019 * calls depending on the version. 00020 * 00021 * The database API provides applications with the ability to: 00022 * - Get the list of albums. 00023 * - Create, delete and rename albums. 00024 * - Get the list of photos in each album. 00025 * - Add photos to albums. 00026 * 00027 * The image manipulation API provides applications with the ability to: 00028 * - Create and capture images and video clips. 00029 * - Read and write image data. 00030 * - Convert images to different formats. 00031 * - Display images. 00032 * - Scale, rotate and crop images. 00033 * 00034 * @{ 00035 * @} 00036 */ 00037 /** 00038 * @ingroup Imaging 00039 */ 00040 00041 /** 00042 * @file ImageLibCommon.h 00043 * @version 1.0 00044 * @brief Public 68k common header file for the Image Library API on Treo 600 devices. 00045 * 00046 * This file contains common defines and error codes to be used with Imaging Library API. 00047 * <hr> 00048 */ 00049 00050 #ifndef IMAGELIB_COMMON_H 00051 #define IMAGELIB_COMMON_H 00052 00053 #include <PalmOS.h> 00054 #include <PalmTypes.h> 00055 00056 #define ImageLibCreatorID 'imgL' /**< Imaging library creator ID */ 00057 #define ImageLibTypeID 'libr' /**< Standard library type */ 00058 #define ImageLibName "ImageLibrary" /**< Imaging library database name */ 00059 00060 /** 00061 * @name Preview Image Dimensions 00062 * @brief Preview height and width in standard pixels. On a double density device, 00063 * the bitmap returned would be twice these dimensions. 00064 */ 00065 /*@{*/ 00066 #define kPalmSizeImageWidth 160 00067 #define kPalmSizeImageHeight 120 00068 #define kFullSizeImageWidth 640 00069 #define kFullSizeImageHeight 480 00070 #define kThumbnailImageWidth 40 00071 #define kThumbnailImageHeight 30 00072 #define kPreviewBitmapWidth (kPalmSizeImageWidth) 00073 #define kPreviewBitmapHeight (kPalmSizeImageHeight) 00074 /*@}*/ 00075 00076 #define kInvalidRecIndex ((UInt16)0xFFFF ) /**< define for invalid record index */ 00077 00078 #define kImageFilenameLength (dmDBNameLength) /**< max filename length */ 00079 00080 /** 00081 * @name Sort Orders 00082 */ 00083 /*@{*/ 00084 #define kNoSortOrder (0) 00085 #define kSortByName (1) 00086 #define kSortByDate (2) 00087 #define kSortByNameDesc (3) 00088 #define kSortByDateDesc (4) 00089 /*@}*/ 00090 00091 /** 00092 * @name Image Operation Codes 00093 */ 00094 /*@{*/ 00095 #define kResizeOperation (0) 00096 #define kJPEGOperation (1) 00097 #define kVFSOperation (2) 00098 /*@}*/ 00099 00100 /** Handle returned by ImageLibIterateImages or ImageLibIterateVFSImages. */ 00101 typedef void * ImageIteratorHandle; 00102 00103 /** Passed in when calling ImageLibSetProgressCallback */ 00104 typedef void (*ImageLibProgressCallbackType) (Int32 progress, Int32 max, Int8 operation); 00105 00106 /** 00107 * @name Error Codes 00108 */ 00109 /*@{*/ 00110 #define imageLibErrorClass (appErrorClass | 0x1000) 00111 #define imageLibErrBadParam (imageLibErrorClass) 00112 #define imageLibErrNoCamera (imageLibErrorClass + 1) 00113 #define imageLibErrInternalFailure (imageLibErrorClass + 2) 00114 #define imageLibErrWriteFailure (imageLibErrorClass + 3) 00115 #define imageLibErrReadFailure (imageLibErrorClass + 4) 00116 #define imageLibErrBadData (imageLibErrorClass + 5) 00117 #define imageLibErrBadImageType (imageLibErrorClass + 6) 00118 #define imageLibErrBadImageDepth (imageLibErrorClass + 7) 00119 #define imageLibErrBadDimensions (imageLibErrorClass + 8) 00120 #define imageLibErrInitializationFailed (imageLibErrorClass + 9) 00121 #define imageLibErrBadColorspace (imageLibErrorClass + 10) 00122 #define imageLibErrBadThumbnailType (imageLibErrorClass + 11) 00123 #define imageLibErrThumnailExists (imageLibErrorClass + 12) 00124 #define imageLibErrBadScaleFactor (imageLibErrorClass + 13) 00125 #define imageLibErrBadBitmapType (imageLibErrorClass + 14) 00126 #define imageLibErrImageAlreadyDownsized (imageLibErrorClass + 15) 00127 #define imageLibErrImageLocked (imageLibErrorClass + 16) 00128 /*@}*/ 00129 00130 #endif
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide |