Open tomc3 opened 9 years ago
The URI schemes are basically the same, if that's what you mean. Are you using this with laravel? The sample configuration should give a glimpse
Yes i'm using laravel, I saw that file.
But i'm not sure how to resize image with the updated version with and without recipes
, if possible can you please provide a example.
Here are my steps that I follow right now now.
thapp/image
and thapp/jitimage
using composer'Thapp\JitImage\Framework\Laravel\JitImageServiceProvider'
'Jmg' => 'Thapp\JitImage\Framework\Laravel\Facade\Jmg'
php artisan vendor:publish
Now to how to resize image and get output, if possible can you please provide an example.
// What to use
Jmg::source('image.jpg') or
Jmg::make('thumb','image.jpg')
In your template, e.g. resize
:
<img src="{{ Jmg::take('image.jpg', 'images')->resize(200, 0) }}"/>
The second parameter is the path alias as defined in config.paths
You may also output an image tag instead of the source string
{!! Jmg::take('image.jpg', 'images', true, ['name' => 'image'])->resize(200, 0) !!}
will output something like:
<img src="/media/cached/68f93bf3/fs_9531c743df10eb1168f.jpg" width="200" height="100" name="image" />
Thanks a lot :) very clear now. Best image manipulation library ever.
I can see there is also support for imagine
also, but that is experimental. :)
Yes, JitImage uses the thapp/image lib by default, but if you need more advanced stuff for custom filters, e.g. font support, you can go with Imagine, or you can just write your own adapter (e.g. for intervention/image).
I want to add a canvas in my project and image in that canvas will print in cmyk, is it possible with this package, if yes can u give me any suggestion and example code.
It will great if you add little docs to
develop
branch. I'm able to open image, but i'm not sure how to apply various operations, are does resizing still works the same as inmaster
branch.Thanks