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

imagecolorsforindex():将动画gif转换为jpg时,颜色索引244超出范围

I'm using Laravel and the SimpleImage class to convert images to thumbnails.

this is the code that converts the images and produces the error:

    $img = new SimpleImage(public_path() . '/img/temp/' . $rnd . '.' . $ext);
    $img->fit_to_width(125)->save(public_path().'/img/thumbs/'.$rnd.'.jpg');
    unlink(public_path().'/img/temp/'.$rnd.'.'.$ext);

the variables $rnd and $ext are assigned before this code. Also, not all gifs produce this error, some work, some don't.

I can't figure it out..

近期文章

  • 使用PHP和AJAX处理输入
  • lastInsertId()导致程序崩溃
  • 如何通过连接表检索数据
  • 倒计时器在firefox中不起作用
  • php-cli关于IBMi错误/通知报告
  • 当我检查时,checkout.php中没有提取值
  • 打破PHP代码执行并继续下一个请求| 多请求服务器端代码执行
  • 即时通讯使用ajax我的网站的详细页面的一些动态方面,但我有非常不正常的结果
  • 如何在PHP的HTML中找到这个URL?
  • (PHP / HTML)网页文件未执行
  • page.php没有显示内容
  • 将输入数据保存到mysql。 没有错误,没有数据
  • 使用自定义标头将MySQL表导出为CSV
  • 在php中安装imagick时出错
  • 通过post将xml数据从Android发送到PHP
  • 如何计算12轮的前7名成绩
  • PHP:无法获得组合框的选定值
  • php-如何使用PHP构建和签署apk文件?
  • Eclipse PHP不正确的颜色格式/突出显示
  • 从PHP MySql中的不同目录中读取文件

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华