The Lurker's Guide to Babylon 5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
705 B

17 years ago
  1. #!/bin/csh
  2. @ chunksize=8
  3. @ x=0
  4. @ y=0
  5. @ h=120
  6. @ pal=4
  7. @ wid=999
  8. @ maxwid=5
  9. @ chunkheight = $chunksize * $h
  10. if ($#argv < 3) then
  11. echo Usage: $0 file prefix startrow
  12. exit 1
  13. endif
  14. @ r=$3
  15. @ chunks = 0
  16. echo -n determining image height...
  17. set imheight="`identify comictitles.gif |& cut -d' ' -f2 | cut -dx -f2`"
  18. echo $imheight
  19. while ($y < $imheight)
  20. convert -crop ${wid}x${chunkheight}+0+${y} +compress $1 chunk${chunks}.gif
  21. echo chunk $chunks
  22. @ y += $chunkheight
  23. @ chunks++
  24. end
  25. @ chunkno = 0
  26. while ($chunkno < $chunks)
  27. @ y = 0
  28. while ($y < $chunkheight)
  29. convert +dither -crop ${wid}x${h}+0+${y} -colors $pal chunk${chunkno}.gif $2${r}.gif
  30. echo $r
  31. @ y += $h
  32. @ r++
  33. end
  34. @ chunkno++
  35. end