!if $wims_read_parm!=$empty
  !set parms=$wims_read_parm
  !set parms=!replace internal $	$ by $\
$ in $parms
  !set size=!line 1 of $parms
  !distribute items $size into sx,sy
  !set ppm=!line 2 to -1 of $parms
!else
  !if $parms=$empty
    !exit
  !endif
  !distribute items $parms into sx,sy
  !set ppm=!item 3 to -1 of $parms
!endif

!set ppm=!replace internal $	$ by $\
$ in $ppm

!read canvasimagedir.phtml $ppm
!set ppm=$canvas_ppm

!for pm in ppm, sx, sy
  !set $pm=!slashsubst $($pm)
!next pp

!set pp=!trim $ppm

!set pp=!line 1 to -1 of $pp
!set pp=!translate internal $	$ to $\
$ in $pp
!set pp=!trim $pp

!set canvasdraw_out=!exec canvasdraw\
size $sx,$sy\
$pp

$canvasdraw_out
