iptc

UTF-8 characters not displaying properly from JPEG IPTC data in PHP

我的梦境 提交于 2019-12-07 19:03:30
问题 When reading the IPTC data from an image, UTF-8 accented characters are not displaying properly when reading them via PHP. For example: é, ø and ü With a header content-type set as UTF8, instead of the character, I get the question mark in a black diamond. � If no content-type is set, then I get a dash character: — The following is the code being used to read the IPTC block: $file = '/path/to/image.jpg'; getimagesize($file, $info); $iptc = iptcparse($info['APP13']); I have also tried

Embedding IPTC image data with PHP GD

允我心安 提交于 2019-12-07 18:33:43
问题 I'm trying to embed a IPTC data onto a JPEG image using iptcembed() but am having a bit of trouble. I have verified it is in the end product: // Embed the IPTC data $content = iptcembed($data, $path); // Verify IPTC data is in the end image $iptc = iptcparse($content); var_dump($iptc); Which returns the tags entered. However when I save and reload the image the tags are non existant: // Save the edited image $im = imagecreatefromstring($content); imagejpeg($im, 'phplogo-edited.jpg');

UTF-8 characters not displaying properly from JPEG IPTC data in PHP

早过忘川 提交于 2019-12-06 07:24:06
When reading the IPTC data from an image, UTF-8 accented characters are not displaying properly when reading them via PHP. For example: é, ø and ü With a header content-type set as UTF8, instead of the character, I get the question mark in a black diamond. � If no content-type is set, then I get a dash character: — The following is the code being used to read the IPTC block: $file = '/path/to/image.jpg'; getimagesize($file, $info); $iptc = iptcparse($info['APP13']); I have also tried uploading the exact same image to a WordPress installation on the same server, and it properly strips the

Adding data to IPTC field using Perl

百般思念 提交于 2019-12-04 05:01:12
问题 I want to set custom text to the IPTC field "Special instructions" in Perl. How can this be done without the usage of a modul? 回答1: Updated Again Ok, in the light of your new requirement to actually read, modify and then re-write the IPTC information, you could use the following to read the IPTC information until we find something better: print $image->Identify(); which gives this: stuff .. ... Profiles: Profile-8bim: 44 bytes Profile-iptc: 32 bytes Special Instructions[2,40]: Handle with

How do you get the country/state/region/city/state/zip/postal from GPS coordinates?

女生的网名这么多〃 提交于 2019-12-03 12:32:13
问题 I have GPS coordinates on all of my photos. I want to include tags/IPTC data for the city, state, zip, etc.. However all I have is the GPS coordinates. How can I take these and get meaningful info in an automated fashion (I have thousands upon thousands of photos, so typing each one into google maps would not work). 回答1: You can do reverse geocoding with Google Maps API using the following HTTP request: Simple CSV: http://maps.google.com/maps/geo?q=40.756041,-73.986939&output=csv&sensor=false

making IPTC data searchable

[亡魂溺海] 提交于 2019-12-01 14:34:36
I have a question about IPTC metadata. Is it possible to search images that aren't in a database by their IPTC metadata (keywords) and show them and how would I go about doing this? I just need a basic idea. I know there is the iptcparse() function for PHP. I have already written a function to grab the image name, location, and extension for all images within a galleries folder and all subdirectories by .jpg extension. I need to figure out how to extract the metadata without storing it in a database and how to search through it, grab the relevant images that match the search tag (their IPTC

making IPTC data searchable

为君一笑 提交于 2019-12-01 12:12:13
问题 I have a question about IPTC metadata. Is it possible to search images that aren't in a database by their IPTC metadata (keywords) and show them and how would I go about doing this? I just need a basic idea. I know there is the iptcparse() function for PHP. I have already written a function to grab the image name, location, and extension for all images within a galleries folder and all subdirectories by .jpg extension. I need to figure out how to extract the metadata without storing it in a

Write IPTC data to file

梦想与她 提交于 2019-12-01 00:49:16
I would need to take an existing jpg file and modify the title, the description and the keywords in its IPTC entries. There are several topics here on this but all either without answer or with partial answers. I already know how to read the IPTC informations, but would need to edit them. Could somebody shed some light on this much researched and less known topic? what i have is: NSString: title NSString: description NSArray: keywords NSString: path to the file I would like to take an existing image with existing IPTC data and replace the existing entries with these, but preserve all other

Write IPTC data to file

狂风中的少年 提交于 2019-11-30 18:57:47
问题 I would need to take an existing jpg file and modify the title, the description and the keywords in its IPTC entries. There are several topics here on this but all either without answer or with partial answers. I already know how to read the IPTC informations, but would need to edit them. Could somebody shed some light on this much researched and less known topic? what i have is: NSString: title NSString: description NSArray: keywords NSString: path to the file I would like to take an

Inserting bytes in the middle of binary file

不羁的心 提交于 2019-11-30 12:07:52
I want to add some string in the middle of image metadata block. Under some specific marker. I have to do it on bytes level since .NET has no support for custom metadata fields. The block is built like 1C 02 XX YY YY ZZ ZZ ZZ ... where XX is the ID of the field I need to append and YY YY is the size of it, ZZ = data. I imagine it should be more or less possible to read all the image data up to this marker (1C 02 XX) then increase the size bytes (YY YY), add data at the end of ZZ and then add the rest of the original file? Is this correct? How should I go on with it? It needs to work as fast as