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 
Return to the default flat view Create a new topic Submit Reply
Re: Writing on an image [message #52098 is a reply to message #52097] Tue, 09 January 2007 10:13 Go to previous messageGo to previous 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.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Principle of Least Surprise
Next Topic: widget sizing

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

Current Time: Sun Nov 30 14:53:34 PST 2025

Total time taken to generate the page: 0.32344 seconds