douxi6903 2015-07-08 07:47
浏览 32

从S3获取图像。 旋转它并再次保存S3服务器上的旋转图像

I am working on rotate image functionality.

End users has option to rotate the images. I have given ajax call to rotate the image.

I have image URL like 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 for jpg file. written switch statmt
    $rotate = imagerotate($source, 90, 0);
    $rotatedTmpFile = tempnam('/tmp', 'rotatedThumbnailImage');
    imagejpeg($rotate, $rotatedTmpFile ,100);

Storing it on S3. But I am facing below error when S3 returns the hash key. And I am trying to see image using http://bucketname/hash_key

<Code>AccessDenied</Code><Message>Access Denied</Message> 

Please help!!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
    • ¥15 安装quartus II18.1时弹出此error,怎么解决?
    • ¥15 keil官网下载psn序列号在哪
    • ¥15 想用adb命令做一个通话软件,播放录音
    • ¥30 Pytorch深度学习服务器跑不通问题解决?
    • ¥15 部分客户订单定位有误的问题
    • ¥15 如何在maya程序中利用python编写领子和褶裥的模型的方法
    • ¥15 Bug traq 数据包 大概什么价
    • ¥15 在anaconda上pytorch和paddle paddle下载报错
    • ¥25 自动填写QQ腾讯文档收集表