User Tools

Site Tools


thinkgeo.mapsuite.portablecore.geoimage

ThinkGeo.MapSuite.Core.GeoImage

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

This class represents an image you want to use on the GeoCanvas.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.Core.GeoImage

Members Summary

Public Constructors

GeoImage()

  • This is the constructor used to create a new GeoImage.
Remarks
  • You need to set the PathFileName if you intend to use this constructor.
Parameters

GeoImage(String)

  • This is the constructor to create a new GeoImage
Remarks
  • When you specify the path and filename, it should be in the correct format as such; however, the file does not need to exist on the file system. This is to allow us to accept streams supplied by the developer at runtime. If you choose to provide a file that exists, then we will attempt to use it. If we cannot find it, then we will raise the SteamLoading event and allow you to supply the stream. For example, you can pass in “C:\NotARealPath\File1.ecw”, which does not exist on the file system. When we raise the event for you to supply a stream, we will pass to you the path and filename so you can differentiate the files.
Parameters
  • pathFileName
    • Type:String
    • Description:The path and filename of the image file. Note that this need not actually exisit on the file system; see remarks below.

GeoImage(Stream)

  • This is the constructor to create a new GeoImage.
Remarks
  • If you have a stream or an image in TIFF format, you can use this constructor to create a GeoImage from it.
Parameters
  • imageStream
    • Type:Stream
    • Description:This parameter must be a stream in TIFF format.

GeoImage(Int32,Int32)

  • This is the constructor to create a new GeoImage
Remarks
  • You can use this overload when you want to create a new GeoImage and only want to specify the width and height. You also need to pass in a GeoCanvas that will be used to create the GeoImage.
Parameters
  • width
    • Type:Int32
    • Description:This parameter is the width in pixels for the new GeoImage.
  • height
    • Type:Int32
    • Description:This parameter is the height in pixels for the new GeoImage.

GeoImage(Object)

  • N/A
Remarks
  • N/A
Parameters
  • nativeImage
    • Type:Object
    • Description:N/A

Protected Constructors

Public Methods

GetImageStream(GeoCanvas)

  • This method returns the stream of the GeoImage.
Remarks
  • This method will raise the event that allows the user to supply their own stream. The event is also raised if they do not attempt to open the file specified in the PathFileName property.
Return Value
  • Type:Stream
  • Description:This method returns the stream of the GeoImage.
Parameters

GetWidth()

  • This method gets the width (in pixels) of this image.
Remarks
  • None.
Return Value
  • Type:Int32
  • Description:This method returns the width (in pixels) of this image.
Parameters

GetHeight()

  • This method gets the height (in pixels) of this image.
Remarks
  • None.
Return Value
  • Type:Int32
  • Description:This method returns the height (in pixels) of this image.
Parameters

Close()

  • This method closes the GeoImage. It is the same as calling the Dispose.
Remarks
  • This method closes the GeoImage. It is the same as calling the Dispose.
Return Value
  • Type:Void
  • Description:None
Parameters

Save(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A

Save(Stream,GeoImageFormat)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A

Dispose()

  • This is the Dispose for the class.
Remarks
  • This overload will dispose of the stream in the GeoImage and release its resources.
Return Value
  • Type:Void
  • Description:None
Parameters

ToString()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetType()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Type
  • Description:N/A
Parameters

Protected Methods

Create(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A

CreateCore(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A

Create(Single,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters
  • width
    • Type:Single
    • Description:N/A
  • height
    • Type:Single
    • Description:N/A

CreateCore(Single,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters
  • width
    • Type:Single
    • Description:N/A
  • height
    • Type:Single
    • Description:N/A

GetWidth(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetWidthCore(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetHeight(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetHeightCore(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

SetPixel(GeoImage,Int32,Int32,GeoColor)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • x
    • Type:Int32
    • Description:N/A
  • y
    • Type:Int32
    • Description:N/A

SetPixelCore(GeoImage,Int32,Int32,GeoColor)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • x
    • Type:Int32
    • Description:N/A
  • y
    • Type:Int32
    • Description:N/A

Clone(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
Parameters

CloneCore(GeoImage)

  • N/A
Remarks
  • N/A
Return Value
Parameters

GetPixel(GeoImage,Int32,Int32)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • x
    • Type:Int32
    • Description:N/A
  • y
    • Type:Int32
    • Description:N/A

GetPixelCore(GeoImage,Int32,Int32)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • j
    • Type:Int32
    • Description:N/A
  • i
    • Type:Int32
    • Description:N/A

Dispose(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • concrete
    • Type:Object
    • Description:N/A

DisposeCore(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • concrete
    • Type:Object
    • Description:N/A

Save(GeoImage,Stream,ImageCodecInfo,EncoderParameters)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A
  • jpegCodecInfo
    • Type:ImageCodecInfo
    • Description:N/A
  • encoderParameters
    • Type:EncoderParameters
    • Description:N/A

SaveCore(GeoImage,Stream,Guid,Guid,Int64)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A
  • jpegCodecInfo
    • Type:Guid
    • Description:N/A
  • encoderParameters
    • Type:Guid
    • Description:N/A
  • jpegQuality
    • Type:Int64
    • Description:N/A

Save(GeoImage,Stream,GeoImageFormat)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A

SaveCore(GeoImage,Stream,GeoImageFormat)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • streamSource
    • Type:Stream
    • Description:N/A

SetResolution(GeoImage,Single,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • xDpi
    • Type:Single
    • Description:N/A
  • yDpi
    • Type:Single
    • Description:N/A

SetResolutionCore(GeoImage,Single,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • xDpi
    • Type:Single
    • Description:N/A
  • yDpi
    • Type:Single
    • Description:N/A

Save(GeoImage,String)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • filename
    • Type:String
    • Description:N/A

GetImageHeight(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters
  • imageStream
    • Type:Stream
    • Description:N/A

GetImageHeightCore(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters
  • imageStream
    • Type:Stream
    • Description:N/A

GetImageWidth(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters
  • imageStream
    • Type:Stream
    • Description:N/A

GetImageWidthCore(Stream)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters
  • imageStream
    • Type:Stream
    • Description:N/A

OnStreamLoading(StreamLoadingEventArgs)

  • This method raises the StreamLoading event, allowing you to specify your own stream.
Remarks
  • None
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • e
    • Description:This parameter represents the event arguments for the StreamLoading event.

GetImageStream()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Stream
  • Description:N/A
Parameters

GetImageStreamCore(GeoCanvas)

  • This method returns the stream of the GeoImage.
Remarks
  • This method will raise the event that allows the user to supply their own stream. The event is also raised if they do not attempt to open the file specified in the PathFileName property.
Return Value
  • Type:Stream
  • Description:This method returns the stream of the GeoImage.
Parameters

Clone()

  • N/A
Remarks
  • N/A
Return Value
Parameters

SetPixel(Int32,Int32,GeoColor)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • x
    • Type:Int32
    • Description:N/A
  • y
    • Type:Int32
    • Description:N/A

Save(String)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • filename
    • Type:String
    • Description:N/A

Save(String,GeoImageFormat)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • filePath
    • Type:String
    • Description:N/A

Save(Stream,ImageCodecInfo,EncoderParameters)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • stream
    • Type:Stream
    • Description:N/A
  • jpegCodecInfo
    • Type:ImageCodecInfo
    • Description:N/A
  • encoderParameters
    • Type:EncoderParameters
    • Description:N/A

Finalize()

  • This is the Dispose method for the class.
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

MemberwiseClone()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters

FromStream(Stream)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • stream
    • Type:Stream
    • Description:N/A

Public Properties

NativeImage

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object

PathFilename

  • This property returns the path and filename of the image you want to represent.
Remarks
  • When you specify the path and filename, it should be in the correct format as such; however, the file does not need to exist on the file system. This is to allow us to accept streams supplied by the developer at runtime. If you choose to provide a file that exists, then we will attempt to use it. If we cannot find it, then we will raise the SteamLoading event and allow you to supply the stream. For example, you can pass in “C:\NotARealPath\File1.ecw”, which does not exist on the file system. When we raise the event for you to supply a stream, we will pass to you the path and filename so you can differentiate the files.
Return Value
  • Type:String

PathName

  • This property returns the path part of the PathFileName.
Remarks
  • None
Return Value
  • Type:String

FileName

  • This property returns the filename part of the PathFileName.
Remarks
  • None
Return Value
  • Type:String

CanvasImageFormat

  • This property returns the image format.
Remarks
  • None
Return Value
  • Type:Guid

Protected Properties

Width

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32

Height

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32

Public Events

StreamLoading

  • This event allows you to pass in your own stream to represent the GeoImage.
Remarks
  • If you choose, you can pass in your own stream to represent the GeoImage. The stream can come from a variety of places, such as isolated storage, a compressed file, or an encrypted stream. When the GeoImage is finished with the stream it will dispose of it, so be sure to keep this in mind when passing the stream in. If you do not pass in an alternate stream, the GeoImage will attempt to load the file from the file system using the PathFileName property.

Event Arguments:StreamLoadingEventArgs

thinkgeo.mapsuite.portablecore.geoimage.txt · Last modified: 2017/03/16 21:59 (external edit)