Functions | |
function | __img_via_file__ (x, y, im, zoom, command) ppm_name |
saveimage (ppm_name, im,"ppm") | |
if (isempty(command)) xv | |
else | if (findstr(command,"%f")) command |
endif | if (status!=0) error("the image viewing command failed") |
Variables | |
rm = sprintf ("rm -f \"%s\"", ppm_name) | |
xloadimage = sprintf ("xloadimage -zoom %f \"%s\"", zoom*100, ppm_name) | |
im_display = sprintf ("display -resize %f%% \"%s\"", zoom*100, ppm_name) | |
status | |
else | command = sprintf (command, ppm_name) |
endif if | ( | status! | = 0 |
) |
if | ( | isempty(command) | ) |
saveimage | ( | ppm_name | , | |
im | , | |||
"ppm" | ||||
) |
im_display = sprintf ("display -resize %f%% \"%s\"", zoom*100, ppm_name) |
rm = sprintf ("rm -f \"%s\"", ppm_name) |
Initial value:
system (sprintf ("( %s || %s || %s && %s ) > /dev/null 2>&1 &", im_display, xv, xloadimage, rm))
xloadimage = sprintf ("xloadimage -zoom %f \"%s\"", zoom*100, ppm_name) |