我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Imagecreatefromjpeg显示资源错误

I am trying to use imagecreatefromjpeg() function, and create image from url.

I use this test link, with picture for testing, but get this error :

resource(13) of type (gd)

Here is part of code:

$src= $_POST['src'];

                    $targ_w = $targ_h = 160;
                    $jpeg_quality = 90;
                    $img_r = imagecreatefromjpeg($src);
                    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );


               $test= imagejpeg($dst_r, '/path/to/file, 90);

                      var_dump( $test) ;            

Also, try to download picture,store to folder, and then use function from localdirectory, no success...

近期文章

  • Brandwatch php的HTTP API请求
  • php和oracle之间的连接
  • 关于icecandidate和webrtc的sdp的一些问题
  • memory_get_usage(true)vs Yii Debugger
  • cakePHP使用两个控制器进行路由
  • 传递多个值对我不起作用
  • 设置其filedcollection DRUPAL后无法保存节点
  • 如何使用php发送推送通知到android
  • MySQLi API以及事务如何工作和提交
  • 标题不起作用,它没有显示任何错误[关闭]
  • PHP错误查找器
  • 如何使用Angular File Upload(ng-file-upload)将图片上传到后端Laravel / PHP
  • 有没有办法提交没有提交按钮的表单?
  • 使用CSS / Javascripting包含的PHP站点结构技术
  • 将XML订购到soap客户端
  • 错误#1136但是在上载备份的wordpress数据库时,列似乎与值匹配
  • 图像文件没有在PHP上传
  • PHP:在特定时间发布推文
  • 在laravel 5.1中保留多个数据
  • 如何捕获Web Server和Web Service之间传输的实际数据

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华