exif

EXIF Title Tag in PHP with with exif_read_data()

非 Y 不嫁゛ 提交于 2020-01-04 14:28:13
问题 I have some struggles to get the "Title" tag from a jpg file with PHP. I guess I'm looking through the wrong EXIF Group. I'm using following code $exif = exif_read_data( $image['temp_name'], 0, true); $exif_description = $exif['IFD0']['ImageDescription']; $exif_title = $exif['WINXP']['Title']; $exif_iso = $exif['EXIF']['ISOSpeedRatings']; I looked through some spec lists of EXIF tags, but I always come up with XPTitle as the title. I'm not using Windows. It's hard to believe that its the only

Ipad photos not rotated when uploaded to a website directly from iPad but ok when uploaded from the computer

假如想象 提交于 2020-01-03 15:59:11
问题 I'm developing a PHP website, and when I upload a photo taken from the ipad in portrait mode, it appears in landscape on the website, yet when I upload the very same photo from the computer (no changes made to the photo) it appears correctly in landscape mode. All landscape photos appear in landscape orientation just fine. I've tried to find a way to fix this, and read about getting the orientation from the EXIF data, but the "orientation" tag is actually always the same (1 if I remember

Getting error while running a classification code in keras

这一生的挚爱 提交于 2020-01-03 06:37:13
问题 When I run the code from the following link: https://gist.github.com/fchollet/f35fbc80e066a49d65f1688a7e99f069#file-classifier_from_little_data_script_2-py I get the following error: Using TensorFlow backend. Found 2000 images belonging to 2 classes. /home/nd/anaconda3/lib/python3.6/site-packages/PIL/TiffImagePlugin.py:692: UserWarning: Possibly corrupt EXIF data. Expecting to read 80000 bytes but only got 0. Skipping tag 64640 "Skipping tag %s" % (size, len(data), tag)) I am Using Ubuntu.

Trouble accessing exif information with PIL.Image._getexif()

久未见 提交于 2019-12-31 04:52:09
问题 I am attempting to pull exif information from '.nef' files for the purposes of automatically sorting files into folders based on the retrieved data. Based on my reading, it appears that PIL is a good choice for getting the information into Python. I have PIL installed and it imports correctly, as does the PIL.Image module. The problem arises when I attempt to call 'PIL.Image._getexif()' from PIL import Image from PIL.ExifTags import TAGS firstfile = 'link to file' exif = Image._getexif

常见图片格式详解

依然范特西╮ 提交于 2019-12-31 04:48:16
标明原作者信息 http://www.cnblogs.com/xiangism 做了几年有关图形、图像的工作,对图片格式算是小有经验,在此写成一文章总结下。虽然一开始并不想讲很理论的东西,但写完后发现几乎全是理论,细想一下关于图片格式的知识本身就是理论的东西,囧~~ 那就力求用最简单的方式将这些“理论”讲清楚吧。 常见的图片格式有bmp, jpg(jpeg), png, gif, webp等。 图像基本数据结构 要讲图片格式还先得从图像的基本数据结构说起。在计算机中, 图像是由一个个像素点组成,像素点就是颜色点,而颜色最简单的方式就是用RGB或RGBA表示, 如图所示 (图1) (图2) 如果有A通道就表明这个图像可以有透明效果。 R,G,B每个分量一般是用一个字节(8位)来表示,所以图(1)中每个像素大小就是3*8=24位图, 而图(2)中每个像素大小是4*8=32位。 这里有三点需要说明: 一、图像y方向正立或倒立 图像是二维数据,数据在内存中只能一维存储,二维转一维有不同的对应方式。比较常见的只有两种方式: 按像素“行排列”从上往下或者从下往上。 如图所示的图像有9个像素点,如果从上往下排列成一维数据是(123456789), 如果是从下往上排列则为(789456123)。 只所以会有这种区别是因为,前一种是以计算机图形学的屏幕坐标系为参考(右上为原点,y轴向下 )

How do I record a maker note or user comment in EXIF?

可紊 提交于 2019-12-31 04:43:09
问题 I'm building a camera app, and want to record in the EXIF the settings that the user selected. Most settings have standard fields, but one doesn't, so I thought I'll record it in the maker notes field. I tried let attachments = NSMutableDictionary(dictionary: CMCopyDictionaryOfAttachments(nil, buffer, kCMAttachmentMode_ShouldPropagate) as! NSDictionary) let exif = NSMutableDictionary(dictionary: attachments[kCGImagePropertyExifDictionary] as! NSDictionary) exif[kCGImagePropertyExifMakerNote]

How to use ExifInterface with a stream or URI

两盒软妹~` 提交于 2019-12-30 17:43:23
问题 I'm writing an app that can be sent a photo URI from the "Share via" menu in Android. The kind of URI you get is content://media/external/images/media/556 however ExifInterface wants a standard file name. So how do I read the exif data (I just want orientation) of that file? Here's my (non-working) code: Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); ContentResolver cr = getContentResolver(); InputStream is = cr.openInputStream(uri); Bitmap bm = BitmapFactory.decodeStream(is); //

Remove all but two fields in EXIF data of a jpeg image using C#

纵饮孤独 提交于 2019-12-30 14:39:12
问题 I am using C# and the ImageFactory library (from ImageProcessor.org) to greatly modify a jpg image. It does straightening, cropping, shadow detail enhancement, etc. . It is fully working and successfully writes the new image to a file. But this file contains the original EXIF data, most of which is now incorrect or irrelevant. I definitely need to keep the orientation flag in the EXIF data, as it is needed to correctly orient the modified image. And I want to keep the DateTime. But all the

Image rotation on input type=“file”

非 Y 不嫁゛ 提交于 2019-12-30 08:09:32
问题 I am using react-firebase-file-uploader to upload an avatar to firebase storage. However, any time I upload an image of Portrait Orientation (specifically, images taken on Android and IOS devices - they tend to have OrientationRotate 90 CW in their metadata) the image is rotated 90 degrees. I have read about this previously and I believe that these smartphone images taken are always in Landscape but the orientation is stored EXIF meta . Please correct me if I am mistaken? Below is an example

Writing XPKeywords in Exif

守給你的承諾、 提交于 2019-12-30 07:56:14
问题 I want to write XPKeywords in a Jpeg Image. Till now I am using Sansaleen java api for writing Exif tags in Jpeg images. I am able to write most of the tags like subject, comment, author, rating but I am not able to write Windows XP Keywords. I am using below code: public static TiffOutputField getTiffOutputFieldKeyword( TiffOutputSet outputSet, String metaDataToChange) { TiffOutputField imageHistoryPre = outputSet .findField(TiffConstants.EXIF_TAG_XPKEYWORDS); if (imageHistoryPre != null) {