;;;Uses DOSLIB and IrfanView, both of which are available to download for free from their respective authors ;;;Robert McNeel & Associates owns Doslib (www.en.na.mcneel.com/doslib.htm), Irfan Skiljan owns IrfanView (www.irfanview.com) ;;; ;;; Author: Henry C. Francis ;;; 425 N. Ashe St. ;;; Southern Pines, NC 28387 ;;; http://paracadd.com ;;; All rights reserved. ;;; ;;; COPYRIGHT: ;;; EDITED: ;;; (DEFUN autodpifix (name dpiresstr dohalfs nolayout /) ;dpiresstr = "###" ; dohalfs = if not NIL resolution is doubled to make half-size images (IF debug_autodpifix (PROGN (PRINC "\n") (PRINC "\n\tname = ") (PRINC name) (PRINC "\n\tdpiresstr = ") (PRINC dpiresstr) (PRINC "\n\tdohalfs = ") (PRINC dohalfs) (PRINC "\n\tnolayout = ") (PRINC nolayout) (PRINC "\n") (PRINC) ) ;_ end of PROGN ) ;_ end of IF (IF have_irfanview nil (LOAD "have_irfanview" "\nFile HAVE_IRFANVIEW.LSP not loaded! " ) ;_ end of LOAD ) ;_ end of IF (IF check_for_doslib nil (LOAD "check_for_doslib" "\nFile CHECK_FOR_DOSLIB.LSP not loaded! " ) ;_ end of LOAD ) ;_ end of IF (check_for_doslib) (IF (have_irfanview) ;Irfanview is a free, full featured image editing/conversion application downloadable from the internet (PROGN (COND (nolayout (SETQ this_plot_file name) ) ((WCMATCH name (STRCAT "*-" (GETVAR "ctab") ".tif")) (SETQ this_plot_file name) ) (AND dos_pathextension (SETQ this_plot_file (STRCAT (dos_pathextension name) "-" (GETVAR "ctab") ".tif" ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ this_plot_file (STRCAT (dos_pathextension name) "-" (GETVAR "ctab") ".tif" ) ;_ end of STRCAT ) ;_ end of SETQ ) (T (SETQ this_plot_file name) ) ) ;_ end of COND (IF (FINDFILE this_plot_file) (IF (> (ATOI (SUBSTR (GETVAR "ACADVER") 1 2)) 16) (PROGN (IF debug_autodpifix (PROGN (PRINC "\n") (PRINC "\n\tIrfanView Command Line Entry =\n") (PRINC (STRCAT "\"" (FINDFILE found_iv) "\" \"\"" this_plot_file "\"\" /dpi=" (IF do_setdpi (STRCAT "(" dpiresstr "," dpiresstr ")") (IF dohalfs (STRCAT "(" (ITOA (* (ATOI dpiresstr) 2)) "," (ITOA (* (ATOI dpiresstr) 2)) ")" ) ;_ end of STRCAT (STRCAT "(" dpiresstr "," dpiresstr ")") ) ;_ end of IF ) ;_ end of IF "/tifc=4 /convert=\"" this_plot_file "\"" ) ;_ end of STRCAT ) ;_ end of PRINC (PRINC) ) ;_ end of PROGN ) ;_ end of IF (DOS_EXEWAIT (STRCAT "\"" (FINDFILE found_iv) "\" \"\"" this_plot_file "\"\" /dpi=" (IF do_setdpi (STRCAT "(" dpiresstr "," dpiresstr ")") (IF dohalfs (STRCAT "(" (ITOA (* (ATOI dpiresstr) 2)) "," (ITOA (* (ATOI dpiresstr) 2)) ")" ) ;_ end of STRCAT (STRCAT "(" dpiresstr "," dpiresstr ")") ) ;_ end of IF ) ;_ end of IF "/tifc=4 /convert=\"" this_plot_file "\"" ) ;_ end of STRCAT ) ;_ end of DOS_EXEWAIT ) ;_ end of PROGN ) ;_ end of IF (PROGN (PRINC (STRCAT "\nPlot file: " this_plot_file " not found! ") ) ;_ end of PRINC (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of DEFUN ;;;**************************************************************************** ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 0 0 nil nil T nil T) ;*** DO NOT add text below the comment! ***|;