如何使用RMagick获取图像类型? [英] How to get image type with RMagick?

查看:77
本文介绍了如何使用RMagick获取图像类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到图像的真实类型,因为很多时候它们的扩展名都不正确.

I need to find the real type of images, as a lot of times they come with the wrong extension.

RMagick可以做到吗?怎么样?

Is this possible with RMagick? How?

推荐答案

解决方案:

image.format

这篇关于如何使用RMagick获取图像类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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