Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Cache problems #68

Closed
Augustino7 opened this issue Aug 6, 2016 · 1 comment
Closed

Cache problems #68

Augustino7 opened this issue Aug 6, 2016 · 1 comment

Comments

@Augustino7
Copy link

Augustino7 commented Aug 6, 2016

Hi I have the following error

Error Type:
Catchable Fatal Error (4096)
Error Message:
Argument 1 passed to Intervention\Image\ImageManagerStatic::cache() must be an instance of Closure, string given, called in F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\index.php on line 38 and defined
Location:
File: F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\ImageManagerStatic.php
Line: 83

Code:

$img=Image::cache($ruta);
$img = Image::make($ruta)->resize($medida['nuevo_ancho'], $medida['nuevo_alto']);

Also I tried with this

Code:

$img = Image::cache(function($ruta,$nuevo_ancho, $nuevo_alto) {
Image::make($ruta)->resize($nuevo_ancho, $nuevo_alto);
}, 10, true);

I have the following error

Fatal error: Uncaught exception 'Intervention\Image\Exception\NotReadableException' with message 'Image source not readable' in F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\AbstractDecoder.php:302 Stack trace: #0 F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\AbstractDriver.php(64): Intervention\Image\AbstractDecoder->init(Object(Intervention\Image\ImageCache)) #1 F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\ImageManager.php(50): Intervention\Image\AbstractDriver->init(Object(Intervention\Image\ImageCache)) #2 F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\ImageManagerStatic.php(57): Intervention\Image\ImageManager->make(Object(Intervention\Image\ImageCache)) #3 F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\index.php(42): Intervention\Image\ImageManagerStatic::make(Object(Intervention\Image\ImageCache)) #4 F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\ in F:\XAMPP\htdocs\WIO\SIPROCESA\IMA\vendor\intervention\image\src\Intervention\Image\AbstractDecoder.php on line 302
@Augustino7

@olivervogel
Copy link
Member

Stick to the example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants