----------------------------------------------------------------------
()
| 77 | |
| 78 | //---------------------------------------------------------------------- |
| 79 | public static function buildCache() |
| 80 | { |
| 81 | QRtools::markTime('before_build_cache'); |
| 82 | |
| 83 | $mask = new QRmask(); |
| 84 | for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { |
| 85 | $frame = QRspec::newFrame($a); |
| 86 | if (QR_IMAGE) { |
| 87 | $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; |
| 88 | QRimage::png(self::binarize($frame), $fileName, 1, 0); |
| 89 | } |
| 90 | |
| 91 | $width = count($frame); |
| 92 | $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); |
| 93 | for ($maskNo=0; $maskNo<8; $maskNo++) |
| 94 | $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); |
| 95 | } |
| 96 | |
| 97 | QRtools::markTime('after_build_cache'); |
| 98 | } |
| 99 | |
| 100 | //---------------------------------------------------------------------- |
| 101 | public static function log($outfile, $err) |