comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Missing value and Image size in Image, Function Graphic
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Missing value and Image size in Image, Function Graphic [message #87097 is a reply to message #87095] Tue, 07 January 2014 08:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gompie writes:

> Following your advice on AlphaBackgroundImage, I tried with the following commands.
>
> set_plot, 'ps'
> !p.font=0
> device, filename='fig_better.ps', encapsulated=1, /helvetica
>
> cgImage, cgDemoData(7), CTIndex=0, XRange=[0,500], YRange=[0,500], Margin=0.1,outfile='test.png',output='png', /Save
>
> cgImage, cgDemoData(5),AlphaBackgroundImage='test.png', CTIndex=33, Transparent=30, XRange=[50,250], YRange=[250,450], /Overplot
>
> But get the error unexpected dimensions of background Image. I tried with different formats (gif ps etc) of Alphaimage but got the same message.

Well, uh, the parameter you are passing needs to be an *image*, not the
name of a file containing an image. :-)

Generally, you would get the background image like this, before you set
up the PostScript device:

backgroundImage = cgSnapshot()
ps_open, 'test.png'
cgimage, ...., AlphaBackgroundImage = backgroundImage
ps_close

You can find other examples in the Coyote Plot Gallery:

http://www.idlcoyote.com/gallery/index.html#MULTIPSTRANSPARE NT

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cursor-position/mouse-pointer offset problem on IDL+Windows7
Next Topic: Finding peak with cgHistoplot and bin confusion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:12:38 PDT 2025

Total time taken to generate the page: 1.36140 seconds