Commit 2e44eb72 by sn

@qrcoded fuer serviceplus angepasst, darf erstmal nicht veraendert werden

1 parent ba9d231b
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
* * http://localhost/service/qrcode/?qrcode=test * * http://localhost/service/qrcode/?qrcode=test
* * http://localhost/service/qrcode/a:3:%7Bi:0;s:17:%22www.quaink.de/qr/%22;i:1;s:6:%22test_2%22;i:2;s:6:%22test_2%22;} * * http://localhost/service/qrcode/a:3:%7Bi:0;s:17:%22www.quaink.de/qr/%22;i:1;s:6:%22test_2%22;i:2;s:6:%22test_2%22;}
* *
*
* ACHTUNG: BITTE NICHT AENDERN, DA SERVICEPLUS DRAUF ZUGREIFT!!!!! @since 20111219 @author neumann@netz.coop
*
*/ */
require_once('basepath.inc.php'); require_once('basepath.inc.php');
require_once($__PATH_to_mcClasses . 'include.php'); require_once($__PATH_to_mcClasses . 'include.php');
...@@ -49,7 +52,7 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) { ...@@ -49,7 +52,7 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) {
$_url = 'http://'.$qrtxt.'/'; $_url = 'http://'.$qrtxt.'/';
} }
$Nenner = 3;
// $qrcode_size = 200; // $qrcode_size = 200;
$qrcode_size = 581; $qrcode_size = 581;
...@@ -59,6 +62,10 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) { ...@@ -59,6 +62,10 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) {
$font_type = 'Arial'; $font_type = 'Arial';
$font_start = 38; $font_start = 38;
$qrcode_size = $qrcode_size / $Nenner;
$font_size = $font_size / $Nenner;
$font_start = $font_start / $Nenner;
QRcode::png($_url, $tmp_qrfilepath , $level = QR_ECLEVEL_L, $size = 10, $margin, $saveandprint=false); QRcode::png($_url, $tmp_qrfilepath , $level = QR_ECLEVEL_L, $size = 10, $margin, $saveandprint=false);
$qr_image = new Imagick($tmp_qrfilepath); $qr_image = new Imagick($tmp_qrfilepath);
$qr_image->scaleImage($qrcode_size,$qrcode_size); $qr_image->scaleImage($qrcode_size,$qrcode_size);
...@@ -76,8 +83,8 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) { ...@@ -76,8 +83,8 @@ if(array_key_exists('qrcode', $_GET) && $_GET['qrcode']) {
$text_image->newImage($qrcode_size/2, $qrcode_size, new ImagickPixel( 'white' )); $text_image->newImage($qrcode_size/2, $qrcode_size, new ImagickPixel( 'white' ));
$text_image->setImageFormat('png'); $text_image->setImageFormat('png');
$text_image->annotateImage($draw, 160, $font_start, 90, $_txt1); $text_image->annotateImage($draw, 70, $font_start, 90, $_txt1);
$text_image->annotateImage($draw, 80, $font_start, 90, $_txt2); $text_image->annotateImage($draw, 40, $font_start, 90, $_txt2);
$text_image->annotateImage($draw, 20, $font_start, 90, $_txt3); $text_image->annotateImage($draw, 20, $font_start, 90, $_txt3);
......

587 Bytes | W: | H:

578 Bytes | W: | H:

service/qrcode/tmp/tmp_qrfile.png
service/qrcode/tmp/tmp_qrfile.png
service/qrcode/tmp/tmp_qrfile.png
service/qrcode/tmp/tmp_qrfile.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!