Skip to content

Commit 916db79

Browse files
authored
Merge pull request #219 from SimpleSoftwareIO/develop
4.2.0
2 parents 3b72108 + c4c4c47 commit 916db79

File tree

5 files changed

+63
-7
lines changed

5 files changed

+63
-7
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Simple QrCode
77
[![License](https://poser.pugx.org/simplesoftwareio/simple-qrcode/license.svg)](https://packagist.org/packages/simplesoftwareio/simple-qrcode)
88
[![Total Downloads](https://poser.pugx.org/simplesoftwareio/simple-qrcode/downloads.svg)](https://packagist.org/packages/simplesoftwareio/simple-qrcode)
99

10-
## [Español](https://www.simplesoftware.io/#/docs/simple-qrcode/es) | [Français](https://www.simplesoftware.io/#/docs/simple-qrcode/fr) | [Italiano](https://www.simplesoftware.io/#/docs/simple-qrcode/it) | [Português](https://www.simplesoftware.io/#/docs/simple-qrcode/pt-br) | [Русский](https://www.simplesoftware.io/#/docs/simple-qrcode/ru) | [日本語](https://www.simplesoftware.io/#/docs/simple-qrcode/ja) | [한국어](https://www.simplesoftware.io/#/docs/simple-qrcode/kr) | [हिंदी](https://www.simplesoftware.io/#/docs/simple-qrcode/hi) | [简体中文](https://www.simplesoftware.io/#/docs/simple-qrcode/zh-cn)
10+
## [Deutsch](https://www.simplesoftware.io/#/docs/simple-qrcode/de) | [Español](https://www.simplesoftware.io/#/docs/simple-qrcode/es) | [Français](https://www.simplesoftware.io/#/docs/simple-qrcode/fr) | [Italiano](https://www.simplesoftware.io/#/docs/simple-qrcode/it) | [Português](https://www.simplesoftware.io/#/docs/simple-qrcode/pt-br) | [Русский](https://www.simplesoftware.io/#/docs/simple-qrcode/ru) | [日本語](https://www.simplesoftware.io/#/docs/simple-qrcode/ja) | [한국어](https://www.simplesoftware.io/#/docs/simple-qrcode/kr) | [हिंदी](https://www.simplesoftware.io/#/docs/simple-qrcode/hi) | [简体中文](https://www.simplesoftware.io/#/docs/simple-qrcode/zh-cn)
1111

1212
Language files are currently out of date. We need volunteers to upgrade them to v4! Please submit a PR request!
1313

1414
### Try our dead simple, free file transfer service [keep.sh](https://keep.sh)
1515

16-
![keep.sh](https://user-images.githubusercontent.com/624784/59808382-06676800-92ca-11e9-87b7-70020b6aef5f.gif)
16+
[![keep.sh](https://user-images.githubusercontent.com/624784/95805291-1121e980-0cd3-11eb-9048-0264bd9f2fd7.gif)](https://keep.sh)
1717

18-
Upload files with a single curl command from your terminal! `curl --upload-file your-local-file.txt https://keep.sh`
18+
Easy fast file sharing from the command line with a single curl command! `curl --upload-file your-local-file.txt https://keep.sh`
1919

2020
## Introduction
2121
Simple QrCode is an easy to use wrapper for the popular Laravel framework based on the great work provided by [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode). We created an interface that is familiar and easy to install for Laravel users.
@@ -28,6 +28,16 @@ Documentation for Simple QrCode can be found on our [website.](http://www.simple
2828

2929
![Example 1](docs/imgs/example-1.png) ![Example 2](docs/imgs/example-2.png)
3030

31+
## Use Cases
32+
<p align="center">
33+
<a href="https://www.rsvpify.com">
34+
<img width="300" src="https://rsvpify.com/wp-content/uploads/2017/03/rsvpify-logo-header-rsvp.png">
35+
</a>
36+
</p>
37+
<p align="center">
38+
<a href="https://rsvpify.com/sell-tickets">Platform to sell tickets online</a>
39+
</p>
40+
3141
## Contributing
3242

3343
Please submit all issues and pull requests to the [simplesoftwareio/simple-qrcode](https://github.com/simplesoftwareio/simple-qrcode) repository on the develop branch!

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "simplesoftwareio/simple-qrcode",
33
"description": "Simple QrCode is a QR code generator made for Laravel.",
44
"keywords": ["qrcode", "laravel", "simple", "generator", "wrapper"],
5-
"homepage": "http://www.simplesoftware.io",
5+
"homepage": "https://www.simplesoftware.io/#/docs/simple-qrcode",
66
"license" : "MIT",
77
"authors": [
88
{
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.2",
14+
"php": ">=7.2|^8.0",
1515
"ext-gd": "*",
1616
"bacon/bacon-qr-code": "^2.0"
1717
},

docs/en/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44

55
## Try our dead simple, free file transfer service [keep.sh](https://keep.sh)
66

7-
![keep.sh](https://user-images.githubusercontent.com/624784/59808382-06676800-92ca-11e9-87b7-70020b6aef5f.gif)
7+
[![keep.sh](https://user-images.githubusercontent.com/624784/95805291-1121e980-0cd3-11eb-9048-0264bd9f2fd7.gif)](https://keep.sh)
88

99
Upload files with a single curl command from your terminal! `curl --upload-file file.txt https://keep.sh`
1010

11+
## Use Cases
12+
<p align="center">
13+
<a href="https://www.rsvpify.com">
14+
<img width="300" src="https://rsvpify.com/wp-content/uploads/2017/03/rsvpify-logo-header-rsvp.png">
15+
</a>
16+
</p>
17+
<p align="center">
18+
<a href="https://rsvpify.com/sell-tickets">Platform to sell tickets online</a>
19+
</p>
20+
1121
<a id="docs-introduction"></a>
1222
## Introduction
1323
Simple QrCode is an easy to use wrapper for the popular Laravel framework based on the great work provided by [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode). We created an interface that is familiar and easy to install for Laravel users.
@@ -23,6 +33,8 @@ You **must** install the `imagick` PHP extension if you plan on using the `png`
2333

2434
#### v4
2535

36+
> There was a mistake when creating 4.1.0 and allowing a backwards breaking change into the master branch. The `generate` method will now return an instance of `Illuminate\Support\HtmlString` if you are running Laravel. See https://github.com/SimpleSoftwareIO/simple-qrcode/issues/205 for more information.
37+
2638
There was a Laravel facade issue within v3 that causes some loading issues. The only way to fix this was to create a backwards breaking change so v4 has been released. If you are coming from v2 there is no need to change any code. The below change only effects users on v3.
2739

2840
All references to the `QrCode` facade need to be changed to:
@@ -150,6 +162,8 @@ The following gradient types are supported:
150162

151163
You may change the eye colors by using the `eyeColor` method.
152164

165+
QrCode::eyeColor(0, 255, 255, 255, 0, 0, 0); // Changes the eye color of eye `0`
166+
153167
| Eye Number | Example |
154168
| --- | --- |
155169
| `0` | ![Eye 0](https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/eye-0.png?raw=true) |
@@ -161,6 +175,8 @@ You may change the eye colors by using the `eyeColor` method.
161175

162176
The style can be easily swapped out with `square`, `dot,` or `round`. This will change the blocks within the QrCode. The second parameter will affect the size of the dots or roundness.
163177

178+
QrCode::style('dot'); // Uses the `dot` style.
179+
164180
| Style | Example |
165181
| --- | --- |
166182
| `square` | ![Square](https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/200-pixels.png?raw=true) |
@@ -171,6 +187,8 @@ The style can be easily swapped out with `square`, `dot,` or `round`. This will
171187

172188
The eye within the QrCode supports two different styles, `square` and `circle`.
173189

190+
QrCode::eye('circle'); // Uses the `circle` style eye.
191+
174192
| Style | Example |
175193
| --- | --- |
176194
| `square` | ![Square](https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/200-pixels.png?raw=true) |

src/Image.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,14 @@ public function getImageResource()
5050
{
5151
return $this->image;
5252
}
53+
54+
/**
55+
* Sets the image string.
56+
*
57+
* @param resource $image
58+
*/
59+
public function setImageResource($image)
60+
{
61+
$this->image = $image;
62+
}
5363
}

src/ImageMerge.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,24 @@ public function merge($percentage)
107107
{
108108
$this->setProperties($percentage);
109109

110-
imagecopyresampled(
110+
$img = imagecreatetruecolor($this->sourceImage->getWidth(), $this->sourceImage->getHeight());
111+
imagealphablending($img, true);
112+
$transparent = imagecolorallocatealpha($img, 0, 0, 0, 127);
113+
imagefill($img, 0, 0, $transparent);
114+
115+
imagecopy(
116+
$img,
111117
$this->sourceImage->getImageResource(),
118+
0,
119+
0,
120+
0,
121+
0,
122+
$this->sourceImage->getWidth(),
123+
$this->sourceImage->getHeight()
124+
);
125+
126+
imagecopyresampled(
127+
$img,
112128
$this->mergeImage->getImageResource(),
113129
$this->centerX,
114130
$this->centerY,
@@ -120,6 +136,8 @@ public function merge($percentage)
120136
$this->mergeImageHeight
121137
);
122138

139+
$this->sourceImage->setImageResource($img);
140+
123141
return $this->createImage();
124142
}
125143

0 commit comments

Comments
 (0)