home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / opus / v4 / jpeg / c / jpegcreatemap < prev    next >
AmigaDOS Script File  |  1996-01-17  |  891b  |  44 lines

  1. .key source/a,option
  2. .bra {
  3. .ket }
  4.  
  5. ;$VER: CreateMap 1.2 (10.4.95)
  6.  
  7. ;This shell script creates the .map files for jpegAGA
  8. ;Use the CreateMapBig script for big pictures
  9.  
  10. ;Changes in version 1.1
  11. ;- file names with spaces are supported
  12. ;Changes in version 1.2
  13. ;- works now with all versions of djpeg and not just with those
  14. ;  using the "two-file" command line style
  15.  
  16. ;USAGE: CreateMap file
  17.  
  18. ;NOTE: You need a directory JPEGTMP: on your hard disk
  19. ;      (and enough space on that partition)
  20.  
  21.  
  22. FailAt 21
  23.  
  24. jpegd  -pnm -outfile JPEGTMP:temp.ppm "{source}"
  25.  
  26. IF ERROR
  27.  
  28.   delete >NIL: JPEGTMP:temp.ppm
  29.   echo "Fatal error: could not decode JPEG file."
  30.   QUIT 20
  31.  
  32. ENDIF
  33.  
  34. jpegppm2aga JPEGTMP:temp.ppm "{source}.map" -jpegAGA {option}
  35.  
  36. IF ERROR
  37.   delete >NIL: JPEGTMP:temp.ppm
  38.   delete >NIL: "{source}.map"
  39.   echo "Fatal error: could not create map file."
  40.   QUIT 20
  41. ENDIF
  42.  
  43. delete >NIL: JPEGTMP:temp.ppm
  44.