Did you set the "application_readable" option for "img/image.png"
(see
https://cloud.google.com/appengine/docs/php/config/appconfig#PHP_app_yaml_Static_file_handlers
for more details)?
ImageMagick should work on local dev server. What platform are you on?
On Tuesday, December 22, 2015 at 3:03:05 PM UTC-8, Alex Kerr wrote:
>
> Hi,
>
> Trying a very simple test of ImageMagick - code below.
>
> 1.) ImageMagick extension not available on local dev server it seems - how
> come? Only seems to allow ImageMagick functions on the live GAE server.
>
> 2.) Can't access my test image in my img/ dir - not sure why - this is set
> to be app readable and is there as I can view it via direct URL.
> Error I get is:
>
> Fatal error: Uncaught exception 'ImagickException' with message
> 'UnableToOpenBlob `image.png': No such file or directory @
> error/blob.c/OpenBlob/2709' in
> /base/data/home/apps/s~[myappname]/1.389452794920602844/imgcompress.php:5
> Stack trace: #0
> /base/data/home/apps/s~[myappname]/1.389452794920602844/imgcompress.php(5):
> Imagick->__construct('image.png') #1 {main} thrown in
> /base/data/home/apps/s~[myappname]/1.389452794920602844/imgcompress.php
> on line 5
>
> My php.ini has the line: extension = "imagick.so"
>
>
> Code:
>
> <?php
> $image = 'img/image.png';
> $a = file_get_contents('img/fonts1.png'); // Test to prove files in
> img/dir are app readable
> $compression_type = Imagick::COMPRESSION_UNDEFINED;
>
> $im = new Imagick($image);
>
> $im->setImageCompression($compression_type);
> $im->setImageCompressionQuality(0);
> $im->stripImage();
> $im->writeImage('image2.png');
> ?>
>
> Many thanks for any info!
> Alex
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/22c41b3a-b7b5-4c78-b5f1-f565352a373d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.