如何用 php 从 .jpg 图像中读取 exif

read_exif_data
(PHP 4 )
read_exif_data -- Reads header information stored in TIFF and JPEG images
Description
array exif_read_data ( string filename, string sections, bool arrays, bool thumbnail)
Note: The read_exif_data() function is an alias for exif_read_data().
See also exif_thumbnail().
User Contributed Notes
read_exif_data
inq@inq.dhs.org
03-Jan-2001 03:52
Each of my jpeg files are over 1 meg, and read_exif_data seems to read the
whole file and it's very slow. So I wrote a function to read only the
beginning of each file:
function read_exif_data_quick($path) {
$tmpfile = "/tmp/read_exif_data_quick.tmp_file";
$in = fopen($path, "r");
$out = fopen($tmpfile,"w");
fwrite( $out, fread( $in, 15000 ) );
fclose($in);
fclose($out);
return read_exif_data($tmpfile);
}
And so far it works for all of my jpegs (taken with my digital camera).
garbage@sunflowerroad.com
06-Jul-2001 05:33
I started drooling when I saw that php could read the exif information
automatically for me. Then I found out that read_exif_data is NOT
compiled into the standard win32 build (think about including it please!).
To get around this I found the following program that runs from the
command line and works really well.
it's actually a set of utilities that will even allow you to put exif data
into images.
It's freeware, but the license says no commercial use without written
permission.
http://www.users.bigpond.com/hughthomas/exif.html
garbage@sunflowerroad.com
06-Jul-2001 05:34
By the way, it works under linux or win32
ibaldin@anr.mcnc.org
21-Aug-2001 11:43
Perl Image::Info module is capable of reading EXIF tags (places them into
an associative array). You can write a simple script to use the module and
it will extract all or only required tags out of a jpeg file.

时间: 2024-09-20 05:57:51

如何用 php 从 .jpg 图像中读取 exif的相关文章

PHP OCR实战:用Tesseract从图像中读取文字

Optical Character Recognition (OCR)即光学字符辨识是把打印文本转换成一个数字表示的过程.它有各种各样的实际应用–从数字化印刷书籍.创建收据的电子记录,到车牌识别甚至破解基于图像的验证码. Tesseract是一个能实现OCR的开源项目.你能在*Nix系统,Mac系统和Windows系统上运行这个项目,但是只要使用一个库,我们就能在PHP项目中使用它了.本教程的目的是教你如何使用. 安装 准备 为了让事情变得简单和一致的, 我们将使用虚拟机(本文使用Vagrant

如何在 SQL Server2000 中保存图像及读取图像信息

server //////////////////////////////////////////////////////////////////////////////////Author: stardicky ////E-mail: stardicky@hotmail.com ////QQNumber: 9531511 ////CompanyName: Ezone International ////Class: HBS-0308 ////title: 如何在 SQL Server2000

图像处理-请教各位大神,如何用python提取出两幅图像中不同的部分?

问题描述 请教各位大神,如何用python提取出两幅图像中不同的部分? 1C 各位朋友们好,我有一张图片1.png另一张图片2.png图片1与图片2只有一部分不相同的部分,现在我想以图片1为参照物,把图片2中与图片1中不同的部分裁剪出来形成图片3请教各位做图像处理的大神们应该怎么做,或者有相关的论文可以看的麻烦推荐一下,小白刚入手,还请指点一下,万分感谢,在此先谢过各位朋友们. 解决方案 你可以尝试调用 OpenCV 中的接口,我记得是有个拼接的功能 如果需要源代码方面的话,你可以参考hugin

如何在 Java 应用程序中读取 8 位和 24 位 Microsoft Windows 位图(转)

window|程序 如何在 Java 应用程序中读取 8 位和 24 位 Microsoft Windows 位图在 Java 应用程序中加载位图文件的逐步指南 作者:Jeff West 和 John D. Mitchell 摘要目前,标准的 getImage() 方法仅支持 GIF 和 JPEG 图像.尽管存在用于读取 PNG(可移植网络图形)格式的 Java 例程,但我们还没听说过有用于读取 Microsoft Windows 位图图像的阅读程序.Jeff West 撰写的这篇技巧提供了加载

利用OpenCV检测图像中的长方形画布或纸张并提取图像内容

原文:利用OpenCV检测图像中的长方形画布或纸张并提取图像内容 基于知乎上的一个答案.问题如下: 也就是在一张照片里,已知有个长方形的物体,但是经过了透视投影,已经不再是规则的长方形,那么如何提取这个图形里的内容呢?这是个很常见的场景,比如在博物馆里看到一幅很喜欢的画,用手机找了下来,可是回家一看歪歪斜斜,脑补原画内容又觉得不对,那么就需要算法辅助来从原图里提取原来的内容了.不妨把应用的场景分为以下: 纸张四角的坐标(图中红点)已知的情况 也就是上面的左图中4个红点是可以准确获取,比如手动标注

c++怎样从txt文档中读取数据写入到三维矩阵中

问题描述 c++怎样从txt文档中读取数据写入到三维矩阵中 用MATLAB获取了一幅彩色图像的像素值,得到一个400*300*3的三维矩阵,并保存到txt文档中,怎么写一个c++小程序,把txt中的数据写入到一个三维矩阵中? %读取第k个图像,所有像素 srcImg = imread(fullfile(SRC, srcName)); %保存像素值到txt文档,便于C++测试使用 fid = fopen('JPEG2TXT.txt', 'wt+'); if fid == -1, return, e

FFMPEG内存操作(二)从内存中读取数及数据格式的转换

相关博客列表:     FFMPEG内存操作(一) avio_reading.c 回调读取数据到内存解析      FFMPEG内存操作(二)从内存中读取数及数据格式的转换      FFmpeg内存操作(三)内存转码器     在雷神的<最简单的基于FFmpeg的内存读写例子(内存播放器)>中,它是设计回调函数从输入文件中读取数据.与FFMPEG 官方给出的avio_reading.c不同的是,雷神给的例子是当需要数据的时候,回调函数才去从输入文件读取数据,而avio_reading.c 则

C#从SQL server数据库中读取l图片和存入图片

原文:C#从SQL server数据库中读取l图片和存入图片 本实例主要介绍如何将图片存入数据库.将图片存入数据库,首先要在数据库中建立一张表,将存储图片的字段类型设为Image类型,用FileStream类.BinaryReader把图片读成字节的形式,赋给一个字节数组,然后用ADO.SqlCommand对象的ExecuteNonQuery()方法来把数据保存到数据库中.主要代码如下:     private void button1_Click(object sender, EventArg

用ckeditor上传图片 图片已经上传到服务器 在服务器文件夹中也能找到 上传栏中也显示返回的地址 但 图像中 源文件地址为空 整么将上传返回的图片

问题描述 用ckeditor上传图片图片已经上传到服务器在服务器文件夹中也能找到上传栏中也显示返回的地址但图像中源文件地址为空怎么将上传返回的图片显示出来?谢谢 解决方案 解决方案二:保存图片的时候,连同路径一块保存,然后读取路径显示