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

Home » Public Forums » archive » Re: Writing on an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Writing on an image [message #52097] Tue, 09 January 2007 10:16 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> RETURN, BytScl(image) > snap

Whoops, should read:

RETURN, BytScl(image, Top=254) > snap

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Writing on an image [message #52098 is a reply to message #52097] Tue, 09 January 2007 10:13 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ingo von Borstel writes:

> I like to create a sequence of images where I want to insert information
> into it.
> The images are each stored as usual array: image=INTARR(dimx,dimy)
>
> Is there a possibility to add text to these images (overprint it onto
> this array) like I could for example add text to a displayed image using
> XYOUTS?

Here is a quick and dirty way to do this. You can add
the bells and whistles. :-)

;******************************************************
FUNCTION SignImage, image

; Image assumed to be 2D array.

IF N_Elements(image) EQ 0 THEN Message, 'Must pass image to sign.'
text = 'Copyright FSC'

s = Size(image, /Dimensions)

; Set up Z-Buffer.
thisDevice = !D.Name
Set_Plot, 'Z'
Device, Set_Resolution=s, Z_Buffer=0
Erase
XYOutS, 0.1, 0.1, /Normal, Font=0, text, Color=255
snap = TVRD()
Set_Plot, thisDevice

RETURN, BytScl(image) > snap

END
;******************************************************

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Writing on an image - big thanks [message #52240 is a reply to message #52097] Wed, 10 January 2007 01:09 Go to previous message
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Thanks David,

it works magnificiently for me and really helps me a lot.
Again this shows me that I'm just scratching the surface with my IDL
knowledge...

Best regards,
Ingo
--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Principle of Least Surprise
Next Topic: widget sizing

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

Current Time: Fri Oct 10 07:30:54 PDT 2025

Total time taken to generate the page: 1.11825 seconds