Holywhippet

How do I use the TwoPointsAdjust method of IRasterGeometryProc?

Discussion created by Holywhippet on May 23, 2012
I'm looking to georeference images (jpg, gif etc.) in code and I was looking at this example: http://forums.esri.com/Thread.asp?c=93&f=993&t=53489

The bit that confuses me are these lines:


    Dim pSourcePoints As IPointCollection
    Set pSourcePoints = New Multipoint
    pSourcePoints.AddPoint MakePoint(47.44, -449) ' pixel coords
    pSourcePoints.AddPoint MakePoint(423.5, -250)


Those are supposed to be source co-ordinates for the image to be georeferenced, but they don't make sense to me. I'd have expected the numbers to be something like 0,0 and 100,100 if the image was 100 pixels by 100 pixels in size (or possibly 99,99 for the latter). Instead I see floating point numbers for X and negative values for the Y. The documentation for this method is pretty sparse so I'm not sure what numbers I should be feeding in.

Any ideas?

Outcomes