[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.RawImage

Class RawImage

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

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
Inheritance
object
RawImage
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Data

Gets the image data.

public byte[] Data { get; }

Property Value

byte[]

Format

Gets the format of the image.

public RawImageFormat Format { get; }

Property Value

RawImageFormat

Height

Gets the height of the image in pixels.

public int Height { get; }

Property Value

int

HorizontalResolution

Gets the horizontal resolution of the image.

public float HorizontalResolution { get; }

Property Value

float

VerticalResolution

Gets the vertical resolution of the image.

public float VerticalResolution { get; }

Property Value

float

Width

Gets the width of the image in pixels.

public int Width { get; }

Property Value

int

Methods

FromBytes(byte[], RawImageFormat, int, int, float, float)

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)

Parameters

data byte[]

The byte array containing image data.

format RawImageFormat

The format of the image.

width int

The width of the image in pixels.

height int

The height of the image in pixels.

horizontalResolution float

The horizontal resolution.

verticalResolution float

The vertical resolution.

Returns

RawImage

FromFile(string, RawImageFormat, int, int, float, float)

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)

Parameters

fileName string

The image file name.

format RawImageFormat

The format of the image.

width int

The width of the image in pixels.

height int

The height of the image in pixels.

horizontalResolution float

The horizontal resolution.

verticalResolution float

The vertical resolution.

Returns

RawImage

FromStream(Stream, RawImageFormat, int, int, float, float)

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)

Parameters

stream System.IO.Stream

The stream containing image data.

format RawImageFormat

The format of the image.

width int

The width of the image in pixels.

height int

The height of the image in pixels.

horizontalResolution float

The horizontal resolution.

verticalResolution float

The vertical resolution.

Returns

RawImage