Changes between Version 6 and Version 7 of FDORfc10
- Timestamp:
- 08/31/07 01:26:48 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc10
v6 v7 50 50 WMS Override API will accept a string instead of the enumeration for image format. It will only accept server defined format strings that contain ‘png’, ‘tiff’, ‘jpeg’ or ‘gif’ in their definitions. 51 51 52 For example, by calling SetImageFormat("image/png; PhotometricInterpretation=PaletteColor"), WMS Provider will return raster stream in palette model. And by calling SetImageFormat("image/png; PhotometricInterpretation=RGB"), the raster stream will be returned in RGB model. In this way, WMS Provider could fully make use of the server capability to support different bit-depth. These additional parameters will go into the configuration file like: 53 54 <RasterDefinition name="Image"> 55 <Format>image/png;PhotometricInterpretation=PaletteColor</Format> 56 ... 57 </RasterDefinition> 58 59 However, still only four image file formats are supported: png, tiff, jpeg, and gif. If the user passed a string that contains other image formats like "bmp", "wbmp", etc, an exception will be thrown. 60 52 61 This section outlines the necessary code changes in the unmanaged and managed code. 53 62 … … 71 80 /// 72 81 /// \return 73 /// Returns the WMS format type.82 /// Returns the WMS image format. 74 83 /// 75 FDOWMS_API FdoString* Get FormatType(void) const;84 FDOWMS_API FdoString* GetImageFormat(void) const; 76 85 77 86 /// \brief … … 87 96 /// Returns nothing. 88 97 /// 89 FDOWMS_API void Set FormatType(FdoString* value);98 FDOWMS_API void SetImageFormat(FdoString* value); 90 99 ... 91 100 } … … 107 116 /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 108 117 /// and file types such as Tagged Image File Format (TIFF).</remarks> 109 __property System::String* get_ FormatType();118 __property System::String* get_ImageFormat(); 110 119 111 120 /// <summary>Sets the format type in which the WMS image will be generated.</summary> … … 115 124 /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 116 125 /// and file types such as Tagged Image File Format (TIFF).</remarks> 117 __property System::Void set_ FormatType(System::String* value);126 __property System::Void set_ImageFormat(System::String* value); 118 127 ... 119 128 } … … 123 132 == Implications == 124 133 125 This change will break the backwards compatibility. For example, configuration files created with this change won't be able to be used in previous version. This is a problem because currently WMS override API will do a strict check on parsing <Image> ... </Image> in the configuration file. E.g. it could only recognize png, jpg, Gif, or tif. They are hard-coded in the code: 134 • The change is backwards compatible with existing config files. Existing config files will be readable by the updated WMS provider. 135 136 • The change is not forwards compatible. New config files created by the updated provider are not readable by earlier versions of the WMS provider. 137 This is a problem because earlier versions of the WMS override API will do a strict check on parsing <Image> ... </Image> in the configuration file. It could only recognize "png", "jpg", "Gif", or "tif", as they are hard-coded in the code: 126 138 {{{ 127 139 static FdoString* g_WmsImageFormatPng = L"PNG"; … … 130 142 static FdoString* g_WmsImageFormatGif = L"GIF"; 131 143 }}} 132 There is no problem with forwards compatibility for old version of configuration files will also work with this change.133 144 134 145 == Test Plan ==