Closed barnamah closed 3 years ago
Does the example in the readme not work for you? https://github.com/claviska/SimpleImage#overview
No it does not. it has >fromFile('image.jpg') I want to use like the above. I am using it in a loop over wither 1600 image. the >fromFile('image.jpg') needs file name and so many other details. I simply need to resize. so why I am I getting error?
it says $image ->fromFile('image.jpg') // load image.jpg ->autoOrient() // adjust orientation based on exif data ->resize(320, 200) // resize to 320x200 pixels ->flip('x') // flip horizontally ->colorize('DarkBlue') // tint dark blue ->border('black', 10) // add a 10 pixel black border ->overlay('watermark.png', 'bottom right') // add a watermark image ->toFile('new-image.png', 'image/png') // convert to PNG and save a copy to new-image.png ->toScreen(); // output to the screen there is not best fit. Also why you used namespace. it should have been simple class with functions. I have also posted similar question here https://stackoverflow.com/questions/69034772/simpleimage-php-is-not-working-when-included
Please follow the example and review the current API docs and ensure you’re using the current version. You seem to be mixing up the old abeautifulsite namespace with the new one.
I can confirm that the example shown works, as does the one in /example/index.php
. As this tracker is for bugs and features, and since you have an open issue on SO, I’m going to close this question out.
Hello, I have SimpleImage.php version 2.5.5 and in the same folder I have . If I don't included it inside a function it works. I am using it like this and it works perfectly. Thank you.
I am using it in my test.php file like this
it gives error. Then in a page people mention to use
still no luck.
I tried to use your new SimpleImage class but you don't have single example to initiate object where wen can use it. Now it is almost a week I am struggling with this. Please help.
Suggestion:
Please make example like above in a file. I learned it from the old SimpleImage.php class. Thanks