Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions autoload.php

This file was deleted.

5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
"suggest": {
"behat/transliterator": "Transliterator provides ability to set non-latin1 pretty names"
},
"target-dir": "Gregwar/Image",
"autoload": {
"psr-0": {
"Gregwar\\Image": ""
"psr-4": {
"Gregwar\\Image\\": ""
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion demo/basic.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/cache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/cacheCreate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/cacheName.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/crop.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
8 changes: 4 additions & 4 deletions demo/data.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

$data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl'
.'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr'
.'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r'
.'8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==';
$data = base64_decode($data);

require_once '../Image.php';

use Gregwar\Image\Image;

Image::fromData($data)
->save('out.jpg');
5 changes: 2 additions & 3 deletions demo/fallback.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

echo Image::open('img/something-wrong.png')
->resize(100, 0)
->negate()
->jpeg()
;
->jpeg();
2 changes: 1 addition & 1 deletion demo/gc.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\GarbageCollect;

Expand Down
2 changes: 1 addition & 1 deletion demo/get.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/guess.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
3 changes: 2 additions & 1 deletion demo/inline.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
require_once '../autoload.php';

require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/merge.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion demo/percent.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
7 changes: 4 additions & 3 deletions demo/resource.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?php

require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

$data = 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl'
.'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr'
.'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r'
.'8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==';
$data = base64_decode($data);

require_once '../autoload.php';

use Gregwar\Image\Image;

$gd = imagecreatefromstring($data);

Expand Down
4 changes: 2 additions & 2 deletions demo/watermark.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand All @@ -10,7 +10,7 @@
// Opening vinci.png
$watermark = Image::open('img/vinci.png');

// Mergine vinci text into mona in the top-right corner
// Merging vinci text into mona in the top-right corner
$img->merge($watermark, $img->width()-$watermark->width(),
$img->height()-$watermark->height())
->save('out.jpg', 'jpg');
2 changes: 1 addition & 1 deletion demo/write.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 1 addition & 1 deletion doc/generate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once '../autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Image\Image;

Expand Down
2 changes: 0 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
class_exists('\PHPUnit_Framework_TestCase')) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
}

require_once(__DIR__.'/../autoload.php');