问题标签 [phpthumb]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
69 浏览

php - phpThumb 创建损坏/过大的缩略图

我在使用 phpThumb 库时遇到了一个非常奇怪的问题,由于某种原因,当生成缩略图时,它们被创建的尺寸非常大(150x65 图像为 550k),并且在许多情况下根本无法加载。我已将问题缩小到 phpThumb 库,但我不确定实际问题是什么。这是其中一张图片的示例:http ://www.justsunnies.com.au/image/product/small/nitro_cr-c.jpg

任何帮助将不胜感激,因为我不知道为什么会出现这个问题。

谢谢

0 投票
1 回答
76 浏览

php - 使用 PHPTumb 调整大小

我遇到了 PHPThumb 的问题,我的调整大小功能不起作用。此函数必须将图像大小调整为 DIV 的最大尺寸 x 或 y:

图像未调整大小。

解决方案在这里吗?使用的路径是相对路径,因为文件存储在另一个文件夹中,而 $url 是

任何想法 ?

0 投票
1 回答
69 浏览

phpthumb - phpThumb() 中无法建立连接错误

我正在使用 phpThunmb 显示来自外部链接的图像。对于某些图像,发生如下类型的错误。

在此处输入图像描述

我试图获取该图像的标题信息,如下所示..

但结果是空的。如何解决这个错误?如果无法访问此图像,那么如何在其位置显示备用“图像 imageNotFound.jpg”。

0 投票
3 回答
893 浏览

modx - Modx phpthumbof 对图像没有影响

此构造返回原始大小的图像

  1. 我尝试使用 777 创建 phpthumbof/cache
  2. 我尝试重新安装 phpthumbof
  3. ImageMagick 安装在 php 中
  4. “phpthumb:...allow...docroot...”在配置中启用
  5. 我试过“pthumb”,但结果相同
0 投票
1 回答
458 浏览

.htaccess - 使用 phpthumbof 在 modx revo 中动态添加水印的正确方法是什么

使用 modx revo (2.3.3-pl)。

我想使用 phpthumbof 片段在引用的图像上动态添加水印。换句话说,我想简单地将图像上传到某个位置,然后让它们通过 phpthumbof 片段引用它们以应用水印。

但是我也想保护存储在同一台服务器上的原始图像。我是否正确地认为在这种情况下我应该使用 htaccess 重写规则将图像请求定向到 phpthumb?在这种情况下,试图获取原始图像的人无论如何都会被重定向到已应用水印的缓存图像?

这是人们推荐用来实现我的目标的方式吗?

谢谢!

0 投票
1 回答
199 浏览

php - phpThumb - 是否可以使用 setParameter 方法添加多个过滤器?

我正在使用 phpThumb(此处提供 James Heinrich 实现)构建缩略图构造函数。基本上,我封装phpThumb类以使用如下语法构建缩略图:

这会检查我使用给定的一组选项和过滤器请求缩略图的图像是否存在,如果存在,它只会给我这个资源的 URL。如果没有,它会处理图像,保存生成的缩略图并给我这个新创建的资源的 URL。

到目前为止,一切都很好。当我尝试像这样添加多个过滤器时,我的问题就出现了:

在内部,我这样做:

$filters[$filter]只是一个关联数组,具有不同的过滤器操作码,如usm(不锐化)、gblr(高斯模糊)等。

似乎setParameter()多次调用该方法并没有像我想要的那样工作(或者像它应该的那样)。

有没有办法使用 OO 方法将不同的过滤器堆叠在一起?

0 投票
0 回答
221 浏览

php - phpThumb/Imagemagick 转换并发请求的性能问题

我们phpThumbPhpThumb. 我们已经配置PhpThumb为使用 ImageMagick(依次转换)。但是,我们观察到转换命令花费了太多时间,因此它会降低性能。我们观察到性能会随着图像文件大小的增加和实时/生产服务器上的并发请求数量的增加而降低。我们尝试了各种选项来提高性能,但这些选项都不起作用。以下是ImageMagick配置,

如果我们缺少任何改进性能的方法,请指导我们。我们在 Apache 服务器上运行它。我们不想使用QuatumDepth=8.

0 投票
2 回答
562 浏览

php - PHP thumbnail generator not processing thumbnails

I am using a PHP Thumbnail Generating script that I have used without issue many times in the past. I am currently using it without issue on the very same domain that I am now having problems. The script is processing to a point. It is generating physical thumbnail images and saving them into the preset cache directory but it is not returning resized images to the browser. The image src is in the following format:

I have confirmed that the image exists and can be displayed in a browser itself. Also, the PHP script loads ok as I have tested it by adding an 'echo' to confirm. I have installed this script in multiple locations on the server and the result is the same. I have even tried other versions of PHP Thumbnail Generators and none of them produce resized images in the browsers.

I have checked that GD is active on my server:

PHP is version 5.3.29

Imagemagick is available and path confirmed as '/usr/bin/convert/'.

Here you see the result:

http://demos.mitey.co.nz/image_processor/index.php

All that appears is broken image placeholders instead of the dynamically generated thumbnails. All relevant permissions have be set to 0777 or 0755, tried both. This really isn't a difficult script to use and I have numerous times in the past but I am unable to debug whatever is causing it to fail in this instance.

Anybody have any ideas as to what could be stopping the image source from correctly processing the PHP contained within it? I have tried so many different things that I can no longer focus on the issue and come up with anything else to try.

0 投票
1 回答
1193 浏览

php - PHPthumb 自动向左旋转图像 90 度

我有一张由 iPhone 5s 拍摄的大约 3264 x 2448 的图像,当我将其上传到我的服务器并使用 PHPthumb 生成其缩略图时,它会自动向左旋转 90 度

我做了太多的 RND,但没有发现任何有用的信息,如果有人遇到同样的问题,请告诉我,代码没有什么特别之处,它只发生在那个图像上。

它还在预览中显示左 90 度,但上传的原始图像很好,问题只有缩略图。

0 投票
1 回答
44 浏览

php - phpthumb 不适用于 bmp 文件

我正在使用 phpthumb 创建图像的缩略图,它适用于除 bmp 文件之外的其他格式。使用 bmp 图像返回 false 的方法 GenerateThumbnail()。

我需要为此设置任何参数吗?