Lesson 2: Displaying a TIFF File
What if you wanted your logo to appear on your plots? PV-WAVE has several tools for reading images in different formats. TIFF (Tagged Image File Format) files are very common and very useful because they are easily transported across platforms. This example shows how to place the Rogue Wave Software, Inc., logo on your plot.
You may not know the dimensions of the image, but IMAGE_READ will take care of this problem.
To display a .tif, do the following:
1. Read the file into the variable rw_logo:
rw_logo = IMAGE_READ(!Data_dir + 'rw_small.tif')
2. Define a colormap for the TV routine to use when displaying the image.
clrmap = rw_logo('colormap')
TVLCT, clrmap(0,*), clrmap(1,*),clrmap(2,*)
Now you can display the image using the TV procedure.
3. Display the image:
TV, rw_logo('pixels'), 0
The image is displayed at the top of the window.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.