Method | Description | |
---|---|---|
BytesToImage ( byte data, |
Attempts to convert the byte array, data, into a valid Image, img
|
|
GenericImageIMPL ( System.Windows.Media.ImageBrush ib ) : System |
Create a GenericImageIMPL to render images on specified ImageBrush UIElement
|
|
UpdateImage ( |
Looks up the bitmaps dress, then starts passing the image around as a Byte[] and a System.Media.Size to the overloaded UpdateImages that make this work
|
|
UpdateImage ( ImageSource imgsrc ) : void |
Directly sets this GenericImage's image based on an already created WPF ImageSource
|
|
UpdateImage ( byte data ) : void |
Uses a memory stream to turn a byte array into a BitmapImage via helper method, BytesToImage, then passes the image to UpdateImage(BitmapImage)
|
|
UpdateImage ( byte data, |
if hasHeader is true, then UpdateImage(byte[]) is called otherwise, the size is compared to lastSize, if they differ or header is null, a header is created, and concatinated with data, then UpdateImage(byte[]) is called
|
Method | Description | |
---|---|---|
SizeConverter ( System s ) : |
turns a System.Drawing.Size into the WPF double,double version
|
Method | Description | |
---|---|---|
MakeHeader ( byte rawdata, |
makes a file header with appropriate width, height, length, and such for the bytearray + drawing.size sent as members of the lazycopypastefixerupper
|
|
concat ( byte a, byte b ) : byte[] |
takes 1 byte array, and 1 byte array, and then returns 1 byte array
|
public static BytesToImage ( byte data, |
||
data | byte | image data (ideally) |
img | target image | |
return | bool |
public GenericImageIMPL ( System.Windows.Media.ImageBrush ib ) : System | ||
ib | System.Windows.Media.ImageBrush | Target ImageBrush |
return | System |
protected static SizeConverter ( System s ) : |
||
s | System | /// |
return |
public UpdateImage ( |
||
bmp | /// | |
return | void |
public UpdateImage ( ImageSource imgsrc ) : void | ||
imgsrc | ImageSource | The image to show on this GenericImage |
return | void |
public UpdateImage ( byte data, |
||
data | byte | /// image data /// |
size | /// image size /// | |
hasHeader | bool | /// whether or not a header needs to be concatinated /// |
encoding | string | |
return | void |