src/PhpSigep/Pdf/Semacode.php
function placeBit(&$array, $NR, $NC, $r, $c, $p, $b) {
        if ($r < 0) {
            $r += $NR;
            $c += 4 - (($NR + 4) % 8);
        }
        if ($c < 0) {
            $c += $NC;
            $r += 4 - (($NC + 4) % 8);
        }

        $array[$r * $NC + $c] = ($p << 3) + $b;
    }
function placeBit(&$array, $NR, $NC, $r, $c, $p, $b) {
        if ($r < 0) {
            $r += $NR;
            $c += 4 - (($NR + 4) % 8);
        }
        if ($c < 0) {
            $c += $NC;
            $r += 4 - (($NC + 4) % 8);
        }

        $array[$r * $NC + $c] = ($p << 3) + $b;
    }
function placeBit ( & $ array , $ NR , $ NC , $ r , $ c , $ p , $ b ) { if ( $ r < 0 ) { $ r += $ NR ; $ c += 4 - ( ( $ NR + 4 ) % 8 ) ; } if ( $ c < 0 ) { $ c += $ NC ; $ r += 4 - ( ( $ NC + 4 ) % 8 ) ; } $ array [ $ r * $ NC + $ c ] = ( $ p << 3 ) + $ b ; }
Annex M placement alogorithm low level
Annex M placement alogorithm low level