elboletaire / Watimage

:framed_picture: PHP image manipulation class
https://elboletaire.github.io/Watimage
Other
25 stars 17 forks source link

want to use this class without autoload.php #30

Closed circuitmamu closed 8 years ago

circuitmamu commented 8 years ago

i want to use this class without autload.php and also without namespace.

I tried removing it and want to use directly include the files that is necessary but it's doesn't seems to be run and stuck in loop of codes

elboletaire commented 8 years ago

Please, paste me here what you tried because I've been able to do this just requiring all the files one by one.

circuitmamu commented 8 years ago

can you give me in which sequence you require the files beacuse use and namesapce will give me error.

I want to use this class make watermarked image with it;s thumb of 240 x 240 in same code when any file is uploaded.

elboletaire commented 8 years ago

Just require all the required files one by one.. I don't get what's your problem and you don't help not being specific (plus not answering what I'm asking..).

circuitmamu commented 8 years ago

@elboletaire can you please give me in which sequence you require the files I'm try to require the files one by one but still getting error or namespaces

elboletaire commented 8 years ago

There's no specific sequence, simply require all the files needed:

use Elboletaire\Watimage\Image;

define('DS', DIRECTORY_SEPARATOR);
define('PATH', dirname(__FILE__) . DS);
define('WATIMAGE', PATH . 'Watimage' . DS . 'src' . DS);

require WATIMAGE . 'Image.php';
require WATIMAGE . 'Watermark.php';

$image = new Image('test.jpg');
$watermark = new Watermark('watermark.png');
// [...]