Method SetResolution
SetResolution(float, float)
Sets the horizontal and vertical resolution (DPI) metadata for the image.
public void SetResolution(float horizontalResolution, float verticalResolution)
Parameters
horizontalResolution
floatThe horizontal resolution in DPI.
verticalResolution
floatThe vertical resolution in DPI.
Remarks
This operation updates resolution metadata only and does not alter the pixel data.
Exceptions
- ArgumentOutOfRangeException
Thrown when a specified DPI is less than or equal to zero.
- ObjectDisposedException
Thrown if this instance has been disposed.
SetResolution(float)
Sets both horizontal and vertical resolution to the same DPI value.
public void SetResolution(float dpi)
Parameters
dpi
floatThe resolution in dots per inch to apply to both axes.
Exceptions
- ArgumentOutOfRangeException
Thrown when
dpi
is less than or equal to zero.- ObjectDisposedException
Thrown if this instance has been disposed.