summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordsiddhath2 <dsiddhath2@gmail.com>2017-09-11 13:05:35 +0530
committerdsiddhath2 <dsiddhath2@gmail.com>2017-09-11 13:05:35 +0530
commitb43e01fbe2754486830211ec767a755b872d8139 (patch)
tree7c4c51f9f15e5bfffe6c7b6beeeb6683d355769a
parent0c2dd093938e7003c9e4fb1bccaaf25f75085249 (diff)
downloadphp-zxing-b43e01fbe2754486830211ec767a755b872d8139.zip
php-zxing-b43e01fbe2754486830211ec767a755b872d8139.tar.gz
php-zxing-b43e01fbe2754486830211ec767a755b872d8139.tar.bz2
Cleaned readme
-rw-r--r--LICENSE (renamed from src/LICENSE)0
-rw-r--r--README.md62
-rw-r--r--composer.json6
3 files changed, 65 insertions, 3 deletions
diff --git a/src/LICENSE b/LICENSE
index 33100e5..33100e5 100644
--- a/src/LICENSE
+++ b/LICENSE
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d134dae
--- /dev/null
+++ b/README.md
@@ -0,0 +1,62 @@
+PHPZxing - Wrapper for Zxing Java Library
+===========================================
+PHPZxing is a small php wrapper that uses the Zxing library to Create and read Barcodes.
+Under the hood it still uses the [Zxing library](https://github.com/zxing/zxing) to encode and decode data.
+
+Note
+--------------------
+* Only Decoder is programmed right now. Needs programming of Encoder.
+
+Basic Configuration
+--------------------
+
+Html Code:
+
+```json
+{
+ "require": {
+ "sid/php-zxing": "dev-master"
+ }
+}
+```
+
+How to Use
+----------
+```php
+
+ use PHPZxing\PHPZxingDecoder;
+
+ $decoder = new PHPZxingDecoder();
+ $decodedData = $decoder->decode('../images/Code128Barcode.jpg');
+ print_r($decodedData);
+
+ $config = array(
+ 'try_harder' => true, // Non mobile mode
+ 'multiple_bar_codes' => true, // If the image contains muliple bar codes
+ 'crop' => '100,200,300,300', // If you want to crop image in pixels
+ );
+ $decoder = new PHPZxingDecoder($config);
+ $decodedData = $decoder->decode('../images/'); // Reads images in complete directory
+ print_r($decodedData);
+
+ $decoder = new PHPZxingDecoder();
+ // Images can be sent as an array
+ $imageArrays = array(
+ '../images/Code128Barcode.jpg',
+ '../images/Code39Barcode.jpg'
+ );
+ $decodedData = $decoder->decode($imageArrays);
+ print_r($decodedData);
+
+ $config = array(
+ 'try_harder' => true,
+ 'multiple_bar_codes' => true
+ );
+ $decoder = new PHPZxingDecoder($config);
+ $decodedData = $decoder->decode('../images/multiple_bar_codes.jpg');
+ print_r($decodedData);
+```
+
+Contibution
+--------------------
+Please Contribute or suggest changes. \ No newline at end of file
diff --git a/composer.json b/composer.json
index b6ef109..d1c63af 100644
--- a/composer.json
+++ b/composer.json
@@ -1,8 +1,8 @@
{
- "name": "sid/php-zxing",
+ "name": "dsiddharth2/php-zxing",
"description": "Wrapper for zxing using php",
"type": "library",
- "license": "MIT",
+ "license": "MIT",
"authors": [
{
"name": "Siddharth",
@@ -11,7 +11,7 @@
],
"autoload": {
"psr-0" : {
- "sid/php-zxing" : "src"
+ "dsiddharth2/php-zxing" : "src"
}
}
} \ No newline at end of file