----------------------------------------------------------------------
()
| 210 | |
| 211 | //---------------------------------------------------------------------- |
| 212 | public static function buildCache() |
| 213 | { |
| 214 | QRtools::markTime('before_build_cache'); |
| 215 | |
| 216 | $mask = new QRmask(); |
| 217 | for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { |
| 218 | $frame = QRspec::newFrame($a); |
| 219 | if (QR_IMAGE) { |
| 220 | $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; |
| 221 | QRimage::png(self::binarize($frame), $fileName, 1, 0); |
| 222 | } |
| 223 | |
| 224 | $width = count($frame); |
| 225 | $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); |
| 226 | for ($maskNo=0; $maskNo<8; $maskNo++) |
| 227 | $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); |
| 228 | } |
| 229 | |
| 230 | QRtools::markTime('after_build_cache'); |
| 231 | } |
| 232 | |
| 233 | //---------------------------------------------------------------------- |
| 234 | public static function log($outfile, $err) |