Re: cgImage conflict with device [message #91037 is a reply to message #91036] |
Wed, 27 May 2015 05:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Amin Farhang writes:
>
> Dear all,
>
> I want to save an image with cgImage as eps. But when I use missing_value keyword to save the output a conflict appear between cgImage and device:
>
> For instance, in the following example everything goes well:
>
> filename = FILEPATH(SUBDIR=['examples','data'], 'worldelv.dat')
> image = BYTARR(360,360)
> OPENR, lun, filename, /GET_LUN
> READU, lun, image
> FREE_LUN, lun
> cgLoadCT, 33,Ncolors=254, RGB_TABLE=palette, bottom=1
> cgImage, image, Missing_Value=-32767, Missing_Color='white', PALETTE=palette
>
> But when I try to save output the error appear:
>
> set_plot,'ps'
> Device,filename = 'density.eps',/Color, /encapsulated, xsize=18, ysize=14
> cgImage, image, Missing_Value=-32767, Missing_Color='white', PALETTE=palette
>
>
> ERROR:
> % CGIMAGE: An AlphaBackgroundImage is required to create transparent images in PostScript.
> % Execution halted at: CGIMAGE 1529
>
>
> How can I solve this?
Provide an AlphaBackgroundImage, using that keyword.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|