Application Function DLL
This example adjusts the bounding box of an image while retaining the relative geometric relationship of the pixels. For an image with standard Map Information, this is identical to the “Change Map Model” command within the Image Command Tool.
The difference between this utility and the Image Command Tool occurs when the input image has a non-regular Geometric Model. Consider for instance an image which contains an affine polynomial transform that rotates the image by 40-degrees. After applying this function, the resulting image will still have a 40-degree rotation, but Image Information will now report the bounding box specified by the user.
(C source code)
(EML source code)
(Visual C++ Project)(Windows Only)
This example computes the transformation for every layer independently. This rigorously ensures that the resulting bounding box is the same for every layer. The overwhelming majority of images have the same map model in each layer, and so it would be safe to compute the transform once and apply it to all layers.
Application Function Arguments
imageSetMapExtent($infile, $ulxtn, $ulytn, $lrxtn, $lrytn)
The input image is modified in place, with additional scaling information applied to its geometric model.