public System.Boolean CreateJPEGHiResolutionFromActiveView(ESRI.ArcGIS.Carto.IActiveView activeView, System.String pathFileName)
{
//parameter check
if (activeView == null || !(pathFileName.EndsWith(.jpg)))
{
return false;
}
ESRI.ArcGIS.Output.IExport export = new ESRI.ArcGIS.Output.ExportJPEGClass();
export.ExportFileName = pathFileName;
// Because we are exporting to a resolution that differs from screen
// resolution, we should assign the two values to variables for use
// in our sizing calculations
System.Int32 screenResolution = 96;
System.Int32 outputResolution = 600;
export.Resolution = outputResolution;
ESRI.ArcGIS.esriSystem.tagRECT exportRECT; // This is a structure
// Set up the PixelBounds envelope to match the exportRECT
ESRI.ArcGIS.Geometry.IEnvelope envelope = new ESRI.ArcGIS.Geometry.EnvelopeClass();
envelope.PutCoords(exportRECT.left, exportRECT.top, exportRECT.right, exportRECT.bottom);
export.PixelBounds = envelope;
1 个回复
刘峥 - ArcGIS多面手
赞同来自:
可以参考以下代码输出图片:
要回复问题请先登录或注册