Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2e44eb72
authored
Dec 19, 2011
by
sn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
@qrcoded fuer serviceplus angepasst, darf erstmal nicht veraendert werden
1 parent
ba9d231b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
service/qrcode/index.php
service/qrcode/tmp/tmp_qrfile.png
service/qrcode/index.php
View file @
2e44eb7
...
@@ -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
,
16
0
,
$font_start
,
90
,
$_txt1
);
$text_image
->
annotateImage
(
$draw
,
7
0
,
$font_start
,
90
,
$_txt1
);
$text_image
->
annotateImage
(
$draw
,
8
0
,
$font_start
,
90
,
$_txt2
);
$text_image
->
annotateImage
(
$draw
,
4
0
,
$font_start
,
90
,
$_txt2
);
$text_image
->
annotateImage
(
$draw
,
20
,
$font_start
,
90
,
$_txt3
);
$text_image
->
annotateImage
(
$draw
,
20
,
$font_start
,
90
,
$_txt3
);
...
...
service/qrcode/tmp/tmp_qrfile.png
View file @
2e44eb7
587 Bytes
|
W:
|
H:
578 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment