• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ImageHeader

Taken from http://stackoverflow.com/questions/111345/getting-image-dimensions-without-reading-the-entire-file/111349 Minor improvements including supporting unsigned 16-bit integers when decoding Jfif and added logic to load the image using new Bitmap if reading the headers fails.

Inheritance
System.Object
ImageHeader
Namespace: DotNetNuke.Web.InternalServices
Assembly: DotNetNuke.Web.dll
Syntax
public static class ImageHeader : object

Methods

| Improve this Doc View Source

GetDimensions(BinaryReader)

Gets the dimensions of an image.

Declaration
public static Size GetDimensions(BinaryReader binaryReader)
Parameters
Type Name Description
BinaryReader binaryReader

The path of the image to get the dimensions of.

Returns
Type Description
Size

The dimensions of the specified image.

| Improve this Doc View Source

GetDimensions(String)

Gets the dimensions of an image.

Declaration
public static Size GetDimensions(string path)
Parameters
Type Name Description
System.String path

The path of the image to get the dimensions of.

Returns
Type Description
Size

The dimensions of the specified image.

  • View Source
Back to top by the community, for the community... #DNNCMS