Correction: Image Tile Cutter

Wilhelm Sanke sanke at hrz.uni-kassel.de
Fri Jun 15 02:58:10 EDT 2007


I have made two small corrections in my script which now runs much more 
smoothly. Revolution chokes a bit when it tries to access imagedata that 
are not existent (to be felt especially on the "i-axis", the height).
As is often the case when scripts are hastily put together, there are 
two typos in my "create tiles" script.
I had written "twquart" (the quarter of the width) instead of "thquart" 
(the quarter of the height) when computing iEnd by adding thquart to iStart.
The other omission was to subtract 1 from the values added to iStart and 
jStart to compute iEnd and jEnd.

Here is the relevant part of the script with the corrections (I have 
also corrected the script of the uploaded stack
<http://www.sanke.org/Software/Create16tiles.mc>)

"put - thquart into istart
  put 0 into timgnum
  repeat with hi = 1 to 4
    add thquart to iStart
    put iStart + (thquart-1) into iEnd
#====================
# was: "put iStart + twquart into iEnd" (i.e. was "twquart" instead of 
"thquart")
#==========================
    put -twquart into jStart
    repeat with vj = 1 to 4
      add 1 to timgnum
      add twquart to jStart
      put jStart + (twquart-1) into jEnd
#==================
# was: "put jStart + twquart into jEnd"
#========================="

Regards,

Wilhelm Sanke
<http://www.sanke.org/MetaMedia>





More information about the use-livecode mailing list