X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 03 Nov 2005 12:56 AM by  anon
Saving Image in the IDL window as JPEG
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
03 Nov 2005 12:56 AM
    In our IDL application, we save the image which is being displayed on the screen into JPEG image using the following piece of code. strPath=strToolPath1+'/WINDOW/VIEW_1' oExport = OBJ_NEW('IDLitopExportData') oExport->SetExportParameters,0, $ strPath,FileName, $ '/REGISTRY/SETTINGS/FILE WRITERS/JOINT PHOTOGRAPHIC EXPERTS GROUP', 1.0 oExport->DoAction1,(*pState).oTool The image seen in the view is saved as JPEG. If the image is zoomed then only the zoomed portion is saved as jpeg. Is there a way by which the entire image in the window (even the portions of image not in view) can be saved into JPEG? Thank you Sheri

    Deleted User



    New Member


    Posts:
    New Member


    --
    03 Nov 2005 12:56 AM
    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
    You are not authorized to post a reply.