简体   繁体   English

GD处理的最大分辨率

[英]Max resolution for processing with GD

I have an applicaton to generate images at 600 DPI with 1000*360, so i need an image with 6000*2160 at 72DPI, when i try to create image with this much resolution GD is not working. 我有一个应用程序来以1000 * 360的分辨率以600 DPI生成图像,因此当我尝试创建具有如此高的分辨率的图像时,GD需要工作在72DPI的具有6000 * 2160的图像。 Can some one tell me the reason,? 有人可以告诉我原因吗? or do we have any limitation in processing resolution in GD? 还是在GD中处理分辨率方面有任何限制?

As @DevZer0 mentioned, it seems like a memory problem. 正如@ DevZer0所提到的,这似乎是一个内存问题。

To bypass memory limit, try setting it as infinite with the following command in PHP at the top of your code: 要绕过内存限制,请尝试在代码顶部使用以下命令在PHP中将其设置为infinite:

<?php
ini_set('memory_limit','-1');
?>

You can use Imagemagick as another option, if your GD library doesn't work. 如果您的GD库不起作用,则可以将Imagemagick用作另一个选项。

To create such image you can use "resample" option. 要创建此类图像,您可以使用“重新采样”选项。 Please get more info from the below site. 请从以下站点获取更多信息。

http://www.imagemagick.org/script/command-line-options.php#resample http://www.imagemagick.org/script/command-line-options.php#resample

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM