1 /** \file 2 * \brief Register the ECW Format 3 * 4 * See Copyright Notice in im_lib.h 5 */ 6 module im.im_format_ecw; 7 8 version(IM) : 9 version(none) : // exclude this, as long as there is no binary 10 11 version(DigitalMars) version(Windows) { pragma(lib, "im_ecw.lib"); } // didn't find this in any package 12 13 extern(C) @nogc nothrow : 14 15 /** \defgroup ecw ECW - ECW JPEG 2000 16 * \section Description 17 * 18 * \par 19 * ECW JPEG 2000 Copyright 1998 Earth Resource Mapping Ltd. 20 * Two formats are supported with this module. The ECW (Enhanced Compression Wavelet) format and the ISO JPEG 2000 format. 21 * \par 22 * Access to the ECW format uses the ECW JPEG 2000 SDK version 3.3. 23 * Available in Windows, Linux and Solaris Only. But source code is also available. \n 24 * You must link the application with "im_ecw.lib" 25 * and you must call the function \ref imFormatRegisterECW once 26 * to register the format into the IM core library. \n 27 * Depends also on the ECW JPEG 2000 SDK libraries (NCSEcw.lib). 28 * \par 29 * When using other JPEG 2000 libraries the first registered library will be used to guess the file format. 30 * Use the extension *.ecw to shortcut to this implementation of the JPEG 2000 format. 31 * \par 32 * See \ref im_format_ecw.h 33 * \par 34 * \par 35 * http://www.ermapper.com/ecw/ \n 36 * The three types of licenses available for the ECW JPEG 2000 SDK are as follows: 37 \verbatim 38 - ECW JPEG 2000 SDK Free Use License Agreement - This license governs the free use of 39 the ECW JPEG 2000 SDK with Unlimited Decompression and Limited Compression (Less 40 than 500MB). 41 - ECW JPEG 2000 SDK Public Use License Agreement - This license governs the use of the 42 ECW SDK with Unlimited Decompression and Unlimited Compression for applications 43 licensed under a GNU General Public style license. 44 - ECW JPEG 2000 SDK Commercial Use License Agreement - This license governs the use 45 of the ECW JPEG 2000 SDK with Unlimited Decompression and Unlimited Compression 46 for commercial applications. 47 \endverbatim 48 * 49 * \section Features 50 * 51 \verbatim 52 Data Types: Byte, Short, UShort, Float 53 Color Spaces: BINARY, GRAY, RGB, YCBCR 54 Compressions: 55 ECW - Enhanced Compression Wavelet 56 JPEG-2000 - ISO JPEG 2000 57 Only one image. 58 Can have an alpha channel 59 Internally the components are always packed. 60 Lines arranged from top down to bottom. 61 Handle() returns NCSFileView* when reading, NCSEcwCompressClient* when writing. 62 63 Attributes: 64 CompressionRatio IM_FLOAT (1) [example: Ratio=7 just like 7:1] 65 OriginX, OriginY IM_FLOAT (1) 66 Rotation IM_FLOAT (1) 67 CellIncrementX, CellIncrementY IM_FLOAT (1) 68 CellUnits (string) 69 Datum (string) 70 Projection (string) 71 ViewWidth, ViewHeight IM_INT (1) [view zoom] 72 ViewXmin, ViewYmin, ViewXmax, ViewYmax IM_INT (1) [view limits] 73 MultiBandCount IM_USHORT (1) [Number of bands in a multiband gray image.] 74 MultiBandSelect IM_USHORT (1) [Band number to read one band of a multiband gray image. Must be set before reading image info.] 75 76 Comments: 77 Only read support is implemented. 78 To read a region of the image you must set the View* attributes before reading the image data. 79 After reading a partial image the width and height returned in ReadImageInfo is the view size. 80 The view limits define the region to be read. 81 The view size is the actual size of the image, so the result can be zoomed. 82 \endverbatim 83 * \ingroup format */ 84 85 /** Register the ECW Format 86 * \ingroup ecw */ 87 void imFormatRegisterECW();