Changes between Version 6 and Version 7 of FDORfc10


Ignore:
Timestamp:
Aug 31, 2007, 1:26:48 AM (17 years ago)
Author:
klain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc10

    v6 v7  
    5050WMS 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.
    5151
     52For 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
     59However, 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
    5261This section outlines the necessary code changes in the unmanaged and managed code.
    5362
     
    7180    ///
    7281    /// \return
    73     /// Returns the WMS format type.
     82    /// Returns the WMS image format.
    7483    ///
    75     FDOWMS_API FdoString* GetFormatType(void) const;
     84    FDOWMS_API FdoString* GetImageFormat(void) const;
    7685
    7786    /// \brief
     
    8796    /// Returns nothing.
    8897    ///
    89     FDOWMS_API void SetFormatType(FdoString* value);
     98    FDOWMS_API void SetImageFormat(FdoString* value);
    9099...
    91100}
     
    107116    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG)
    108117    /// and file types such as Tagged Image File Format (TIFF).</remarks>
    109     __property System::String* get_FormatType();
     118    __property System::String* get_ImageFormat();
    110119
    111120    /// <summary>Sets the format type in which the WMS image will be generated.</summary>
     
    115124    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG)
    116125    /// 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);
    118127...
    119128}
     
    123132== Implications ==
    124133
    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.
     137This 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:
    126138{{{
    127139    static FdoString* g_WmsImageFormatPng                   = L"PNG";
     
    130142    static FdoString* g_WmsImageFormatGif                   = L"GIF";
    131143}}}
    132 There is no problem with forwards compatibility for old version of configuration files will also work with this change.
    133144
    134145== Test Plan ==