如何为新的JPG图像定义DPi? [英] How to define DPi for a new JPG image?

查看:124
本文介绍了如何为新的JPG图像定义DPi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将用PHP创建一个新的JPG图像.如何设置新的JPG图像的DBi值.

I'm going to create a new JPG image with PHP. How can I set the DBi value of a new JPG image.

德克

推荐答案

JPG是一种像素格式,它并不真正了解物理尺寸,例如每英寸点数.

JPG is a Pixel format that doesn't really know physical dimensions like Dots Per Inch.

您所能做的就是在文件的元数据中写入一个dpi值,以辅助进一步处理,但这只是一个建议,不能使用GD库完成.

All you can do is write a dpi value into the file's Metadata as assistance for further processing, but it's just a recommendation and it can't be done using the GD library.

您必须为此使用第三方库.参见例如此问题的第二个答案:如何将exif数据添加到图片?

You would have to use an third-party library for this. See e.g. the second answer to this question: How do I add exif data to an image?

这篇关于如何为新的JPG图像定义DPi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆