Class ImageMessage
This class is used to represent an image message.
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public class ImageMessage
Properties
ActualImage
The actual image in byte array format.
Declaration
public byte[] ActualImage { get; set; }
Property Value
| Type | Description |
|---|---|
| byte[] |
DiffImage
The diff image in byte array format.
Declaration
public byte[] DiffImage { get; set; }
Property Value
| Type | Description |
|---|---|
| byte[] |
ExpectedImage
The expected image in byte array format.
Declaration
public byte[] ExpectedImage { get; set; }
Property Value
| Type | Description |
|---|---|
| byte[] |
ImageName
The name of the image. This is used to identify the image file.
Declaration
public string ImageName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MessageId
The message ID for the image message. This is used to identify the message type.
Declaration
public static Guid MessageId { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
PathName
The path name of the image. This is used to identify the location of the image file.
Declaration
public string PathName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(byte[])
Deserializes the byte array to an image message. This is used to receive the message over the network or to read it from a file.
Declaration
public static ImageMessage Deserialize(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The byte array representation of the image message. This should be the result of a previous call to Serialize(). |
Returns
| Type | Description |
|---|---|
| ImageMessage | The deserialized image message. |
Serialize()
Serializes the image message to a byte array. This is used to send the message over the network or to save it to a file.
Declaration
public byte[] Serialize()
Returns
| Type | Description |
|---|---|
| byte[] | The serialized byte array representation of the image message. |