Application Upgrading Notes

PureWeb® STK

4.x

Calgary Scientific Inc. 2013

Contents 4.0

Introduction
Changes to Encoder Configuration


Introduction

Applications made from the 3.1.x version of PureWeb will require minor modifications to upgrade them to the current PureWeb 4.0. These Application Upgrading Notes will help you identify the specific changes.

Top of Page


Changes to Encoder Configuration

The way developers set preferred remote image format has changed between version 3.1.x and version 4.0 of PureWeb. This does not impact PureWeb-enabled applications which only used Quality APIs, but it does affect applications which were using the now-deprecated service-side PreferredRemoteImageFormat API.

In 3.1, all views, for all clients, would receive the image in the preferred format set using PreferredRemoteImageFormat:

StateManager.Instance.ViewManager.PreferredRemoteImageFormat = RemoteImageFormat.{ Tiles | Jpeg | Base64Jpeg };

With the introduction of an HTML5 client in PureWeb 4.0, we found it compelling to allow different clients to receive images in a different format, thereby supporting platform-specific preferred response type (JavaScript, for example, does not support tiles).

In 4.0, image encoding is set using new client-side APIs, which also now support the .png file format. After a view has connected, developers can make modifications to the view's EncoderConfiguration as follows. Once the new EncoderConfiguration APIs are accessed for either mime type or quality, those settings will override any previous API.

view.EncoderConfiguration.FullQualityFormat.Quality = 100; // unused for Png
view.EncoderConfiguration.FullQualityFormat.MimeType = SupportedMimeTypes.Png;

view.EncoderConfiguration.InteractiveFormat.Quality = 70;
view.EncoderConfiguration.InteractiveFormat.MimeType = SupportedMimeTypes.Tiles;

Top of Page