Sheri,
The main thing is you need is to tell the export operation to export the image, rather than the view. Something like this:
idImage=(*pState).oTool->FindIdentifiers("*image",/VISUALIZATIONS)
oExport = OBJ_NEW('IDLitopExportData')
oExport->SetExportParameters,0, $
idImage,FileName, $
'/REGISTRY/SETTINGS/FILE WRITERS/JOINT PHOTOGRAPHIC EXPERTS GROUP', 1.0
oExport->DoAction1,(*pState).oTool
You should be aware that the IDLitOpExportData class has changed in 6.2: it no longer contains a ::SetExportParameters method. Instead, these values can be set via the ::SetProperty method. So, if you upgrade to 6.2, you would do something like this:
pro test
iimage,dist(300)
filename="test.jpg"
idImage=oTool->FindIdentifiers("*image",/VISUALIZATIONS)
idExport=oTool->FindIdentifiers("*file/export",/OPERATIONS)
idWriter=oTool->FindIdentifiers("*Joint Photographic Experts Group",/FILE_WRITERS)
oOpExport=oTool->GetByIdentifier(idExport)
oOpExport->SetProperty,$
DESTINATION=0, $ ; 0 = export to file
FILENAME=filename, $
ITEM_ID=idImage, $
SCALE_FACTOR=1.0, $
SOURCE=0, $ ; 0 = use the specified ITEM_ID
WRITER_ID=idWriter,$
SHOW_EXECUTION_UI=0
result=oTool->DoAction(idExport)
oOpExport->SetProperty,SHOW_EXECUTION_UI=1
end
Dave
|