[]
Represents an image natively supported by the PDF format.
Raw images are inserted into PDF as is, without any processing.
[Obsolete("The RawImage class is obsolete. Use GrapeCity.Documents.Drawing.Image instead.")]
public class RawImage : IImage, IDisposable
Gets the image data.
public byte[] Data { get; }
Gets the format of the image.
public RawImageFormat Format { get; }
Gets the height of the image in pixels.
public int Height { get; }
Gets the horizontal resolution of the image.
public float HorizontalResolution { get; }
Gets the vertical resolution of the image.
public float VerticalResolution { get; }
Gets the width of the image in pixels.
public int Width { get; }
Creates a new instance of the RawImage class from a byte array, RawImage supports only JPEG or JPEG2000 image formats.
public static RawImage FromBytes(byte[] data, RawImageFormat format, int width, int height, float horizontalResolution = 96, float verticalResolution = 96)
data
byte[]The byte array containing image data.
format
RawImageFormatThe format of the image.
width
intThe width of the image in pixels.
height
intThe height of the image in pixels.
horizontalResolution
floatThe horizontal resolution.
verticalResolution
floatThe vertical resolution.
Creates a new instance of the RawImage class from a disk file, RawImage supports only JPEG or JPEG2000 image formats.
public static RawImage FromFile(string fileName, RawImageFormat format, int width, int height, float horizontalResolution = 96, float verticalResolution = 96)
fileName
stringThe image file name.
format
RawImageFormatThe format of the image.
width
intThe width of the image in pixels.
height
intThe height of the image in pixels.
horizontalResolution
floatThe horizontal resolution.
verticalResolution
floatThe vertical resolution.
Creates a new instance of the RawImage class from a stream, RawImage supports only JPEG or JPEG2000 image formats.
public static RawImage FromStream(Stream stream, RawImageFormat format, int width, int height, float horizontalResolution = 96, float verticalResolution = 96)
stream
System.IO.StreamThe stream containing image data.
format
RawImageFormatThe format of the image.
width
intThe width of the image in pixels.
height
intThe height of the image in pixels.
horizontalResolution
floatThe horizontal resolution.
verticalResolution
floatThe vertical resolution.