Method GetConvertedDataSize
GetConvertedDataSize(Vector2Int, TextureFormat)
Get the number of bytes required to store a converted image with the given parameters.
Declaration
public int GetConvertedDataSize(Vector2Int dimensions, TextureFormat format)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int | dimensions | The desired dimensions of the converted image. |
TextureFormat | format | The desired |
Returns
Type | Description |
---|---|
int | The number of bytes required to store the converted image. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the desired |
ArgumentOutOfRangeException | Thrown if the desired |
InvalidOperationException | Thrown if the image is invalid. |
See Also
GetConvertedDataSize(ConversionParams)
Get the number of bytes required to store a converted image with the given parameters.
Declaration
public int GetConvertedDataSize(XRCpuImage.ConversionParams conversionParams)
Parameters
Type | Name | Description |
---|---|---|
XRCpuImage.ConversionParams | conversionParams | The desired conversion parameters. |
Returns
Type | Description |
---|---|
int | The number of bytes required to store the converted image. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the desired format is not supported. |
ArgumentOutOfRangeException | Thrown if the desired dimensions exceed the native image dimensions. |
InvalidOperationException | Thrown if the image is invalid. |