home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
600-699
/
ff634.lha
/
APIG
/
apig33.lzh
/
e14_iffintoscr.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-09-27
|
1KB
|
52 lines
/* Example of loading iff pic into custom screen */
/* A window is not opened, just a screen, no need for a port */
/* */
x = addlib("apig.library",0,-30,0)
scr = 0
picture = loadiff("gorilla")
if picture = '0000 0000'x then
do
say "I could not find that picture"
exit
end
width = iffwidth(picture)
height = iffheight(picture)
depth = iffdepth(picture)
viewmode = iffviewmode(picture)
ncolors = iffcolors(picture)
colors = iffcolortab(picture)
say "Width = " width
say "Depth = " depth
say "Height = " height
say "Viewmode = " viewmode
say "Numcolors = " ncolors
say "ColorTab = " d2x(c2d(colors))
CUSTOMSCREEN = c2d('000F'x) /* no point in creating all those globals */
scr = openscreen(0,0,width,height,depth,1,0,viemode,CUSTOMSCREEN,0)
scrrp = getscreenrastport(scr)
z = useiffcolor(picture,scr)
/* the following blit copies the IFF image into the screens rastport */
z = bltbitmaprastport(picture,0,0,scrrp,0,0,width,height,c2d('00c0'x))
/* if you wanna save it */
/* x = saveiff(picture,"ram:newpic",colors,viewmode,1) */
/* x = saveiff(picture,"ram:newpic",colors,viewmode,0) */
wait 5 sec
x = freebitmap(picture)
say "freed bitmap " x
x = closescreen(scr)
exit