metadata

iOS - Issues adding kCGImagePropertyExifUserComment to image

倾然丶 夕夏残阳落幕 提交于 2019-12-08 07:07:02
问题 I'm having problems writing a kCGImagePropertyExifUserComment to my image. My code (overall) works, as it writes GPS coordinates without a hassle. However, writing some additional info in the UserComment field is non-working (and I'm not sure why). Code is: CFDictionarySetValue(mutable, kCGImagePropertyExifUserComment, [NSString stringWithFormat:@"%0.0f,%0.0f,%0.0f",yaw,pitch,roll]); Anyone have an idea on this? 回答1: If anyone else is wondering how to do this, I've finally figured it out:

how to extract camera related information from image

╄→尐↘猪︶ㄣ 提交于 2019-12-08 06:03:40
问题 How can I extract camera related information (eg. camera model, date taken etc) from an image stored in the database? For example, I resized an image and uploaded it and saved its path in database. I want to display basic camera information while displaying the image, therefore I want to extract the information. Thanks. 回答1: You want to read the EXIF data. For PHP, use exif_read_data. Sample: <?php $exif = exif_read_data('img.jpg'); $model = $exif['Model']; $iso = $exif['ISOSpeedRatings'];

Set Custom Metadata to Files of any Type

此生再无相见时 提交于 2019-12-08 05:38:33
问题 Is there way to set custom metadata to files of any type? I want the metadata to be copied when the file is renamed, moved or copied. I don't want to use ADS. 回答1: No. At some point your "metadata" just becomes "data" which should be stored inside (or with) the file itself. If you are trying to avoid having a database, but store some sort of state data with the file, you have a few options: encode the metadata in the file path (ie. use the folder name to contain the metadata) rename the file

App meta data rejected , requires demo account

纵饮孤独 提交于 2019-12-08 03:54:51
问题 My app has been rejected because i needed to put a demo account in the meta data, my app is facebook login based , we store users facebook id and create a customerID on its basis , since there is no password i don't know what to write in the demo account meta data . apple response We began the review of your app but are not able to continue because we need a demo account to fully access your app features. Please provide demo account details in the Review Notes section of the Version

Count number of columns in SQL Server

▼魔方 西西 提交于 2019-12-08 02:56:37
问题 Is there a way to know the number of columns in SQL, something like count()...? 回答1: one way select count(*) from sys.columns another select count(*) from information_schema.columns The bottom one does not have the system tables by table select count(*),table_name from information_schema.COLUMNS GROUP BY table_name tables only select count(*),c.table_name from information_schema.COLUMNS c JOIN information_schema.tables t ON c.TABLE_NAME = t.TABLE_NAME AND c.TABLE_Schema = t.TABLE_Schema WHERE

How to recognize an image file format using its contents?

≯℡__Kan透↙ 提交于 2019-12-08 02:18:17
问题 If a Image file is of format .png then it will contain ‰PNG , at the beginning of the file. (when read in Text mode) If a Image file is of format .bmp then it will contain BM , at the beginning of the file. (when read in Text mode) I know that Image formats contain text (data) of certain size (bytes) in the beginning of the file, which is used as metadata of the Image file? My Questions are:- Is this behavior same in all image file formats (or formats in general)? Could a image file ( of no

Fastest way to read PNG metadata in PHP

坚强是说给别人听的谎言 提交于 2019-12-08 01:39:15
问题 I would like to extract two fields from a PNG file. Namely, the geometry field and one of the fields from the metadata. What is the fastest way I could go about doing this? I have benchmarked my script that currently performs this and by far the slowest action is executing the actual ImageMagick "identify" program on the PNG file. (.4 seconds vs .0001 seconds to parse the outputted array for the geometry and 8.39E-5 seconds to parse key phrases from the metadata) Thanks in advance for any

Video metadata edit with Ffmpeg

纵饮孤独 提交于 2019-12-08 00:12:33
问题 I want to change the video metadata. Orginal video info(ffmpeg -i video.mp4) Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 creation_time : 2007-11-22 09:11:58 Duration: 00:00:52.70, start: 0.000000, bitrate: 235 kb/s Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 107 kb/s Metadata: creation_time : 2007-11-22 09:11:58 handler_name : (C) 2007 Google Inc. v06.24.2007. Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p,

ODATA WebService, get $metadata C#

早过忘川 提交于 2019-12-08 00:12:22
问题 I have a WebService that expose this $metadata : <?xml version="1.0" encoding="UTF-8" standalone="true"?> <edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0"> > <edmx:DataServices m:DataServiceVersion="1.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <Schema xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm" xmlns:d="http://schemas.microsoft.com/ado/2007/08

JpegBitmapEncoder.Save() throws exception when writing image with metadata to MemoryStream

白昼怎懂夜的黑 提交于 2019-12-07 23:53:03
问题 I am trying to set up metadata on JPG image what does not have it. You can't use in-place writer (InPlaceBitmapMetadataWriter) in this case, cuz there is no place for metadata in image. If I use FileStream as output - everything works fine. But if I try to use MemoryStream as output - JpegBitmapEncoder.Save() throws an exception (Exception from HRESULT: 0xC0000005). After some investigation I also found out what encoder can save image to memory stream if I supply null instead of metadata. I