STK Graphics PrimitivesSend comments on this topic.
WriteExtentAndSubExtentTransparentColorStringCentralBody Method (IAgStkGraphicsJpeg2000WriterInitializer)
See Also
ImageUri
The image filename to be converted. Only file URIs are supported.
Extent
An array representing the Cartographic Extent of the image. The elements should be provided in the order west longitude, south latitude, east longitude, north latitude. The extent can be null if the image defines the extent as with a GeoTIFF image.
SubExtent
If a sub-extent is specified, only part of the image defined by the sub-extent is converted. The elements should be provided in the order west longitude, south latitude, east longitude, north latitude.
CompressionProfile
The compression profile.
CompressionRate
A higher compression rate results in smaller JPEG 2000 files. Use 1 for no compression. Valid values are 1 to 65535.
Jpeg2000Uri
The JPEG 2000 filename. Only file URIs are supported.
OverwriteExistingFile
If true and the JPEG 2000 file already exists, the file will be overwritten during the conversion.
TransparentColor
Any color in the image that matches the transparent color will be made transparent.
CentralBodyName
target central body of output image.
Windows





Windows & Linux

Description

Converts an image, such as a BMP, to a GeoJP2 file that can be used as an image globe overlay. The extent of the image can be defined as an input parameter if necessary.

Syntax

[Visual Basic .NET]
Public Sub WriteExtentAndSubExtentTransparentColorStringCentralBody( _
    ByVal ImageUri As String, _
    ByVal Extent As System.Array, _
    ByVal SubExtent As System.Array, _
    ByVal CompressionProfile As AgEStkGraphicsJpeg2000CompressionProfile, _
    ByVal CompressionRate As Integer, _
    ByVal Jpeg2000Uri As String, _
    ByVal OverwriteExistingFile As Boolean, _
    ByVal TransparentColor As System.Drawing.Color, _
    ByVal CentralBodyName As String _
)
[C#]
public void WriteExtentAndSubExtentTransparentColorStringCentralBody(
    string ImageUri,
    System.Array Extent,
    System.Array SubExtent,
    AgEStkGraphicsJpeg2000CompressionProfile CompressionProfile,
    int CompressionRate,
    string Jpeg2000Uri,
    bool OverwriteExistingFile,
    System.Drawing.Color TransparentColor,
    string CentralBodyName
);
[Managed C++]
public: void WriteExtentAndSubExtentTransparentColorStringCentralBody(
    String __gc ^ ImageUri,
    System::Array ^ Extent,
    System::Array ^ SubExtent,
    AgEStkGraphicsJpeg2000CompressionProfile CompressionProfile,
    int CompressionRate,
    String __gc ^ Jpeg2000Uri,
    bool OverwriteExistingFile,
    uint TransparentColor,
    String __gc ^ CentralBodyName
);
[Unmanaged C++]
public: HRESULT WriteExtentAndSubExtentTransparentColorStringCentralBody(
    BSTR ImageUri,
    SAFEARRAY * * Extent,
    SAFEARRAY * * SubExtent,
    AgEStkGraphicsJpeg2000CompressionProfile CompressionProfile,
    int CompressionRate,
    BSTR Jpeg2000Uri,
    VARIANT_BOOL OverwriteExistingFile,
    uint TransparentColor,
    BSTR CentralBodyName
);
[Java]
public void writeExtentAndSubExtentTransparentColorStringCentralBody(
    String ImageUri,
    AgSafeArray Extent,
    AgSafeArray SubExtent,
    AgEStkGraphicsJpeg2000CompressionProfile CompressionProfile,
    Integer CompressionRate,
    String Jpeg2000Uri,
    bool OverwriteExistingFile,
    long TransparentColor,
    String CentralBodyName
);
[Python - STK API ]
def WriteExtentAndSubExtentTransparentColorStringCentralBody(self, ImageUri:str, Extent:list, SubExtent:list, CompressionProfile:"AgEStkGraphicsJpeg2000CompressionProfile", CompressionRate:int, Jpeg2000Uri:str, OverwriteExistingFile:bool, TransparentColor:agi.stk12.utilities.colors.Color, CentralBodyName:str) -> None:

Parameters

ImageUri
The image filename to be converted. Only file URIs are supported.
Extent
An array representing the Cartographic Extent of the image. The elements should be provided in the order west longitude, south latitude, east longitude, north latitude. The extent can be null if the image defines the extent as with a GeoTIFF image.
SubExtent
If a sub-extent is specified, only part of the image defined by the sub-extent is converted. The elements should be provided in the order west longitude, south latitude, east longitude, north latitude.
CompressionProfile
The compression profile.
CompressionRate
A higher compression rate results in smaller JPEG 2000 files. Use 1 for no compression. Valid values are 1 to 65535.
Jpeg2000Uri
The JPEG 2000 filename. Only file URIs are supported.
OverwriteExistingFile
If true and the JPEG 2000 file already exists, the file will be overwritten during the conversion.
TransparentColor
Any color in the image that matches the transparent color will be made transparent.
CentralBodyName
target central body of output image.

See Also

© 2025 Analytical Graphics, Inc. All Rights Reserved.