Hi,
I trying to export bmp image from arcmap ,
right noww the i extend the envelop by 5 ,
but i want to export my envelop to the orignal raster resolution, of the arcmap,
Does Anyone can help? what function should i use to let know to the export class ,
that i need export this image in raster resolution.
Thx For The Help.
I trying to export bmp image from arcmap ,
right noww the i extend the envelop by 5 ,
but i want to export my envelop to the orignal raster resolution, of the arcmap,
Does Anyone can help? what function should i use to let know to the export class ,
that i need export this image in raster resolution.
Thx For The Help.
Code:
tagRECT baseRECT = new tagRECT();
baseRECT.left = 0;
baseRECT.top = 0;
baseRECT.right = 650;
baseRECT.bottom = 650;
baseRECT = hookHelper.ActiveView.ExportFrame;
ESRI.ArcGIS.Geometry.IEnvelope envelope = new ESRI.ArcGIS.Geometry.EnvelopeClass();
envelope.PutCoords(baseRECT.left, baseRECT.top, baseRECT.right, baseRECT.bottom);
ESRI.ArcGIS.Output.IExport export = new ESRI.ArcGIS.Output.ExportBMPClass();
export.ExportFileName = pathFileName;
export.Resolution = 96;
export.PixelBounds = envelope;
System.Int32 hDC = 0;
ESRI.ArcGIS.Geometry.IEnvelope ContextEnvelope = expEnvelope.Envelope;
double Max = Math.Max(ContextEnvelope.Width, ContextEnvelope.Height);
ContextEnvelope.Expand((Max * 5 - ContextEnvelope.Width) / 2, (Max * 5- ContextEnvelope.Height) / 2, false);
hDC = export.StartExporting();
try
{
hookHelper.ActiveView.Output(hDC, (System.Int16)export.Resolution, ref baseRECT, ContextEnvelope, null);
}
catch (Exception ex)
{
log.InfoFormat("runDetectionForm_OnPrepareNextFrame, Exception:{0}", ex.Message);
return false;
}
export.FinishExporting();
export.Cleanup();