0

我正在尝试使用 ImageNew 函数(coldfusion 8)创建带有图像 URL 链接的图像对象,例如<cfset myImage=ImageNew(evaluate( "http://.../../1.jpg" ))>

那里有很多链接,而且大部分都很好,但是对于一些图片链接,我在调用 ImageNew 函数时出错:尝试读取图片时发生异常。javax.imageio.IIOException:不支持的图像类型

它与图像的大小有关吗?有人知道吗?

非常感谢

结果:最后,是 CMYK/RGB 问题。CF8 似乎在处理 CMYK 方面有问题,而且 CF8 不支持从 CMYK 到 RGB 的转换。我使用 ImageMagic 进行转换。

4

1 回答 1

1

To be fair, I have this issue sometimes. I don't think it has anything to do with your code, coldfusion's image processing utilities either cannot process a perfectly valid image, or they choke on an image that is not up to standards. When this happens it is typically a client uploading an image and my system throws an error. They send me the file, I resave it out using photoshop or something like that, and poof, coldfusion likes it.

The only solution I know if this is the problem, is to use a third party image processor instread of coldfusion's built in functions. I used to use cfx_imagecr

http://efflare.com/products/cfx_imagecr/

But that is not the only solution out there.

于 2010-12-13T21:43:06.887 回答