C# Class GPS.Utils.OcrClientUtils

Utils is a general utility class that contains helper methods used throughout this application.
Show file Open project: ProjPossibility/CSUN-MobileMapMagnifier

Public Methods

Method Description
GetPhotoBits ( Stream stream ) : byte[]

Returns a byte array with the content of the stream.

LimitPhotoSize ( Stream photoStream, double photoMaxSizeDiagonal ) : Stream

It will ensure that the photo does not exceed a maximum size. If needed the photo is scaled down by preserving its aspect ratio.

Method Details

GetPhotoBits() public static method

Returns a byte array with the content of the stream.
public static GetPhotoBits ( Stream stream ) : byte[]
stream Stream
return byte[]

LimitPhotoSize() public static method

It will ensure that the photo does not exceed a maximum size. If needed the photo is scaled down by preserving its aspect ratio.
public static LimitPhotoSize ( Stream photoStream, double photoMaxSizeDiagonal ) : Stream
photoStream Stream /// The stream that represents the photo as returned by CameraCaptureTask or PhotoChooserTask. ///
photoMaxSizeDiagonal double /// The diagonal of the scaled down photo. ///
return Stream