JpegManager Object

Overview

JpegManager is the main object which creates all other objects and performs auxiliary functions.

For more information on metadata, see Chapter 7 - Metadata Extraction.

Member List

Properties


DateTime Expires (Read-only)

Returns the expiration date and time of the component. If the property returns 9/9/9999, it means a permanent registration key is installed.

See also: Section 1.6 - Expiration Mechanism.


JpegGif Gif (Read-only)

Returns the JpegGif object which manages GIF output.

See also: Chapter 8 - GIF Output.


bool PreserveICCProfile (Read/Write)

False by default. If set to true, preserves the ICC profile of the original image in a thumbnail. Must be set before calling OpenImage.

See also: Section 7.5 - Metadata Preservation.


bool PreserveMetadata (Read/Write)

False by default. If set to true, preserves the Exif and IPTC metadata of the original image in a thumbnail. Must be set before calling OpenImage.

See also: Section 7.5 - Metadata Preservation.


string RegKey (Write-only)

Specifies the registration key. If this property is not set, AspJpeg.NET looks for a registration key in the .confg file.

See also: Section 1.6 - Expiration Mechanism.


int TiffIndex (Read/Write)

Specifies the 1-based index of a page to be opened from a multi-page TIFF file. For this property to take effect, it must be set before calling OpenImage. 1 by default. Used only when the image being opened is in TIFF format, ignored for all other image formats. You can find out the number of pages in a TIFF image via the Info collection.

See also: Section 7.4 - TIFF Support.


string Version (Read-only)
Returns the current version of the component in the format "2.9.0.12311". The first two numbers are the actual version, the last number is the build number.

string WindowsDirectory (Read-only)

Returns the Windows directory on the current machine, such as "c:\Windows". This property is useful to compute the path to a font file required by the JpegCanvas.PrintText method.

See also: Section 5.3 - Text Drawing with PrintText.

Methods


JpegImage CreateImage(int Width, int Height)
JpegImage CreateImage(int Width, int Height, uint Color)
JpegImage CreateImage(int Width, int Height, System.Drawing.Color Color)

Creates a blank image with the specified width and height. Returns an instance of the JpegImage object representing this image. This method is useful for creating a blank "canvas" for drawing graphics, text and other images. Color specifies the background color in HTML-style hexadecimal format, such as 0xHFFE055, or as a System.Drawing.Color object. 0 (black) by default.

See also: Chapter 5 - Drawing & Typing.


void LogonUser(string Domain, string Username, string Password)

Impersonates an arbitrary user account. Use this method to avoid an "Access Denied" error when trying to save an image to, or open it from, a remote drive.

If Domain is empty, the local computer will be used to validate the specified username/password.


JpegImage OpenImage(string Path)
JpegImage OpenImage(byte [] ImageBytes)

Opens an image for resizing from a disk file specified by Path (must be a full physical path) or byte array specified by ImageBytes. Returns an instance of the JpegImage object representing the opened image.

See also: Section 2.1 - Thumbnail-Creating Steps.


JpegInfo OpenInfo(string Path)
JpegInfo OpenInfo(byte [] ImageBytes)

Obtains EXIF and IPTC metadata from an image specified by Path or byte array specified by ImageBytes. Returns an instance of the JpegInfo object which is a collection of metadata fields. The collection may be empty if the image contains no metadata.

See also: Chapter 7 - Metadata.


void RevertToSelf()

Ends impersonation begun by LogonUser.