diff --git a/blockchain/inc/block.php b/blockchain/inc/block.php index f24e9e2..6eada35 100644 --- a/blockchain/inc/block.php +++ b/blockchain/inc/block.php @@ -78,6 +78,12 @@ class blockchain { self::$special_blocks = array (); + self::$special_blocks[] = new block( + '00000000000000000001f5beb60d9ca47adf18db5136b558379ed533fc9f6c85', + 753335, + 'ELISABETH_2_HAS_DIED' + ); + self::$special_blocks[] = new block( '000000000000000000065676a19a2dfba0171b592d52f5ea7db54d45bb386400', 724697, @@ -549,7 +555,7 @@ class blockchain // pour splinelineblack [ [17,61,86], - [254,254,254] + [255,255,255] ], [ [17,61,86], @@ -590,16 +596,18 @@ class blockchain // Rajout des HASHES $white = imagecolorallocate($vImage, 254, 254, 254); - $black = imagecolorallocate($vImage, $color_tab[$color][1][0], $color_tab[$color][1][1], $color_tab[$color][1][2]); - $fond = imagecolorallocate($vImage, $color_tab[$color][0][0], $color_tab[$color][0][1], $color_tab[$color][0][2]); + $fond = imagecolorallocate($vImage, 255, 255, 255); + $black = imagecolorallocate($vImage, 0, 0, 0); $w = imagesx($vImage); $h = imagesy($vImage); // On rend le blanc transparent imagecolortransparent($vImage, $white); - // On place un fond transparent + // On place un fond transparent sur toute l'image imagefilledrectangle($vImage, 0, 0, $w, $h, $white); + // Puis un fond sur la zone de dessin... + imagefilledrectangle($vImage, 0, $hauteur, $w, $h-$hauteur, $fond); $len = strlen($the_block->hash); $ratio_w = ($w - 10) / $len; @@ -704,7 +712,10 @@ class blockchain $bbox = imagettfbbox(14, 0, $font, $the_name); imagettftext($vImage, 14, 0, ($w-3)-($bbox[2]-$bbox[0]), ($hauteur-5), $black, $font, $the_name); - return [$white, $fond, $black, $font, $color_tab[$color][1], $color_tab[$color][0]]; + $draw = imagecolorallocate($vImage, $color_tab[$color][1][0], $color_tab[$color][1][1], $color_tab[$color][1][2]); + $fond = imagecolorallocate($vImage, $color_tab[$color][0][0], $color_tab[$color][0][1], $color_tab[$color][0][2]); + + return [$white, $fond, $draw, $font, $color_tab[$color][1], $color_tab[$color][0]]; } public static function getTransactionData($the_block, $type=1) diff --git a/methode2.tgz b/methode2.tgz deleted file mode 100644 index 38bb681..0000000 Binary files a/methode2.tgz and /dev/null differ diff --git a/methode2/circle/draw.php b/methode2/circle/draw.php index ea6f3de..605a98a 100644 --- a/methode2/circle/draw.php +++ b/methode2/circle/draw.php @@ -44,7 +44,7 @@ function DrawBlock($the_block, $vImage, $parametres) foreach($data as $transaction) { - for($i=0;$i<$nbColor;$i++) + for($i=0;$i < $nbColor;$i++) { $valeur = hexdec($transaction['hash'][$i%TX_HASH_LEN]); if ($valeur != 0) $valeur += $valeur - 8; diff --git a/methode2/mondrian/draw.php b/methode2/mondrian/draw.php index e902206..630ac96 100644 --- a/methode2/mondrian/draw.php +++ b/methode2/mondrian/draw.php @@ -53,8 +53,8 @@ function DrawBlock($the_block, $vImage, $parametres) //if (($x2 - $x1) < ($width*0.015)) break; //if (($y2 - $y1) < ($height*0.015)) break; - $factor=$the_block->nonce % 100; - // Je triche: les petits rectangle sont blancs + $factor=($x1*$x2*$y1*$y2) % 100; + // Je triche: les petits rectangles sont blancs if (($x2 - $x1) < 6) $factor=90; if (($y2 - $y1) < 6) $factor=90;