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

Home » Public Forums » archive » Convert string to image matrix (like xyouts)
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: Convert string to image matrix (like xyouts) [message #94394 is a reply to message #94392] Tue, 09 May 2017 02:41 Go to previous messageGo to previous message
heinz1357 is currently offline  heinz1357
Messages: 2
Registered: May 2017
Junior Member
Am Montag, 8. Mai 2017 21:42:51 UTC+2 schrieb fawltyl...@gmail.com:
> On Monday, May 8, 2017 at 8:31:20 PM UTC+2, hein...@googlemail.com wrote:
>> Is there a method to generate an image from a string, i.e. a binary image that contains the string as printed text?
>>
>> I'm currently generating a movie from several image frames (using IDLffVideoWrite), and would like to put additional information into the frames as text (such as dates).
>
> You can use xyouts with the Z device and read back the image with tvrd().
>
> regards,
> Lajos

Ok, thanks.

In case anyone wants to know, this is the solution:

result_arr = MAKE_ARRAY(image_size[0], image_size[1], /BYTE, VALUE=0)
old_device = !D.Name
SET_PLOT, 'Z', /COPY
DEVICE, SET_RESOLUTION=image_size
ERASE
TV, result_arr
xyouts, location[0], location[1], input_text, CHARSIZE=font_size, CHARTHICK=fontsize/2
result_arr=TVRD()
SET_PLOT, old_device, /COPY
return, result_arr
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: overplotting contours on tvimage....
Next Topic: defroi

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

Current Time: Fri Oct 10 04:48:47 PDT 2025

Total time taken to generate the page: 0.16399 seconds