Opening a JPEG from Amazon S3

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
mcousins

Opening a JPEG from Amazon S3

Post by mcousins »

I was wondering if anybody has done any Amazon S3 work here? I have a JPEG on Amazon that has a restricted ACL for security. I can get a copy of it in memory after connecting, but can you create an Imagick from a binary variable rather than a filename? The constructor documentation only shows instantiation with a filename.

Here's an example of what I want to do:

Code: Select all

$s3 = new S3("access key", "secret key");
$binaryjpegfromamazon = $s3::getObject($bucket, $uri);
$image = new Imagick($binaryjpegfromamazon );
Post Reply