php - Take image from S3. Rotate it and again save rotated image on the S3 server -
i working on rotate image functionality.
end users has option rotate images. have given ajax call rotate image.
i have image url http://myservername/e8520a11e5809268b920138badc416cf
i have tried implementing below steps:
$src = http://myservername/e8520a11e5809268b920138badc416cf; $content = pcurl::get($src); $originalfile = tempnam("/tmp", "tempimagecontent"); file_put_contents($originalfile, $content); $source=imagecreatefromjpeg($originalfile); //only jpg file. written switch statmt $rotate = imagerotate($source, 90, 0); $rotatedtmpfile = tempnam('/tmp', 'rotatedthumbnailimage'); imagejpeg($rotate, $rotatedtmpfile ,100); storing on s3. facing below error when s3 returns hash key. , trying see image using http://bucketname/hash_key
<code>accessdenied</code><message>access denied</message> please help!!
Comments
Post a Comment