X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 29 May 2006 04:15 AM by  anon
How to display a image with transparency in iImage (iTools) ?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:3
New Member


--
29 May 2006 04:15 AM
    Hello everyone: In my project, I want to display one images in iImage with transparency (or blend, opacity). I had change the Palette with IDLitDataIDLPalette object. Have any object can be use to handle the transparency? Below is a part of code in my project: oParmSet = OBJ_NEW('IDLitParameterSet') oData = OBJ_NEW('IDLitDataIDLImagePixels') result = oData->SetData(data, _EXTRA = _extra) oParmSet->Add, oData, PARAMETER_NAME = 'ImagePixels' LUT_number = 13 TVLCT, R, G, B, /GET palette = TRANSPOSE([ [R],[G],[B] ]) oPalette = OBJ_NEW('IDLitDataIDLPalette', palette,NAME = 'Palette') oParmSet->Add, oPalette, parameter_name='PALETTE' ITREGISTER, 'Example 1 Tool', 'example1tool' identifier = IDLITSYS_CREATETOOL('iTool_test',INITIAL_DATA = oParmSet,$ VISUALIZATION_TYPE = ['Image'])

    Deleted User



    New Member


    Posts:
    New Member


    --
    29 May 2006 04:15 AM
    The documentation for this is still very hidden, but the property that handles transparency of an image in iTools belongs to the IDLitVisImage object and is called ALPHA_CHANNEL. Alpha channel ranges from 0.0 (full transparency, i.e. no visibility) to 1.0 (no transparency). To map this value to the value shown on the Transparency slidebar of the Image property sheet: ALPHA_CHANNEL = (100 - Image Transparency) / 100.0 Programatically, you could set this with a call like: oTool->DoSetProperty(idVisImage, 'ALPHA_CHANNEL', 0.55) That would result in 45% transparency for the image visualization object whose iTools ID you would earlier have assigned to the variable named "idVisImage". James Jones
    You are not authorized to post a reply.