iptc

Copy an image and preserve its EXIF/IPTC data with PHP imageCreateFromJpeg?

三世轮回 提交于 2021-02-16 05:55:07
问题 I having some problems with an image that has EXIF/IPTC data stored in it. When I use imageCreateFromJpeg (to rotate/crop or etc) the newly stored file doesn't preserve the EXIF/IPTC data. My current code looks like this: <?php // Before executing - EXIF/IPTC data is there (checked) $image = "/path/to/my/image.jpg"; $source = imagecreatefromjpeg($image); $rotate = imagerotate($source,90,0); imageJPEG($rotate,$image); // After executing - EXIF/IPTC data doesn't exist anymore. ?> Am I doing

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

帅比萌擦擦* 提交于 2021-02-05 07:31:38
问题 I'm building a WPF desktop app to help me organize photos to post to Facebook. Here's my code for creating a copy of a photo at a new location with a caption (EXIF + IPTC + XMP) added: private void SaveImageAs(string currPath, string newPath, bool setCaption = false, string captionToSet = "") { System.IO.FileStream stream = new System.IO.FileStream(currPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); JpegBitmapDecoder decoder = new JpegBitmapDecoder(stream, BitmapCreateOptions.None

Read /Edit / Write jpg IPTC metadata in Java

喜你入骨 提交于 2021-01-27 22:44:16
问题 I am using Apache Commons but it is not enough for me because it is so old technology. So ,i found iCafe and it seems better but I am having the error below. Any idea what i am doing wrong? private static List<IPTCDataSet> createIPTCDataSet() { List<IPTCDataSet> iptcs = new ArrayList<IPTCDataSet>(); iptcs.add(new IPTCDataSet(IPTCApplicationTag.COPYRIGHT_NOTICE, "Copyright 2014-2016, yuwen_66@yahoo.com")); iptcs.add(new IPTCDataSet(IPTCApplicationTag.CATEGORY, "ICAFE")); iptcs.add(new

Java library for reading and writing IPTC metadata to JPEG and TIFF

余生颓废 提交于 2020-02-11 05:51:07
问题 Does anyone know some opensource Java library for reading and writing IPTC metadata to JPEG and TIFF? Now I'm using Apache Sanselan. Unfortunately, it can only read IPTC, not write (http://commons.apache.org/sanselan/formatsupport.html). Will be very grateful for your assistance. Denis. 回答1: Take a look at IIM4J. Use IIMWriter to write IPTC IIM tags into (jpeg) images. 回答2: The Apache Commons Imaging (formerly sanselan) has added support for writing IPTC metadata in the svn repo code for

Extract IPTC using ImageMagick without Entities but UTF-8

泄露秘密 提交于 2019-12-25 04:42:32
问题 I have an image containing ITPC data and use the following command to extract the IPTC as textual data: convert image.jpg IPTCTEXT:iptc.txt The problem is that this seems to be using entities for "special characters": 2#120#Caption="Beschreibung für den Import aus IPTC" Actually it should be "für" here. But instead of getting the correct entity ü for the "ü" character i get two entities (probably both bytes of the UTF-8 encoded character got transformed to entites separated). And these two

IPTC .NET read/write c# library

痞子三分冷 提交于 2019-12-18 13:18:00
问题 I am looking for some library to read/write IPTC metadata from Jpg files. Open source or paid, doesn't matter. It should work with .NET 3.5 and c#. Does anybody know such a library? I googled but haven't found anything. 回答1: *http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.aspx using System; using System.IO; using System.Linq; using System.Windows.Media.Imaging; namespace wictest { class Program { static void Main(string[] args) { var stream = new FileStream("1.jpg",

Inserting bytes in the middle of binary file

拜拜、爱过 提交于 2019-12-17 19:27:24
问题 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

Is it possible to view IPTC data in a hex-viewer?

情到浓时终转凉″ 提交于 2019-12-11 10:12:01
问题 I have been trying to examine a JPEG file, known to contain IPTC data, but could notice no strings whatsoever. I tried the well known UNIX strings command, ASCII, 8-bit, 16-bit Unicode --- to no avail: I could not see any strings that I expect to find in IPTC fields. My question is: How is IPTC data encoded? Is it encrypted? Compressed? Other? Why can't it be viewed using the strings command? 回答1: The most probable reason why you cannot view IPTC data using a hex viewer is because it has no

Editing/adding IPTC metadata in Android app

纵饮孤独 提交于 2019-12-10 16:53:43
问题 I have looked at many of the other similar questions but none of them seem to have a precise answer. I'm working on an Android app that works with a lot of images. I am looking to add information to images by editing the value of their IPTC keyword tag (or other appropriate tags). I am using Metadata Extractor for reading metadata but this library doesn't support writing metadata. I have looked at Apache Sanselan which doesn't seem to be appropriate because it has heavy dependency on java.awt

Using CGImageProperties to get EXIF properties

淺唱寂寞╮ 提交于 2019-12-10 14:47:09
问题 I want to be able to add a text comment to the metadata of a JPEG and be able to read it back from within an iphone app. I thought this would be fairly simple as ios4 contains support for EXIF info. So I added metadata using a Windows tool called used AnalogExif and read it back from my app using: NSData *jpeg = UIImageJPEGRepresentation(myUIImage,1.0); CGImageSourceRef source = CGImageSourceCreateWithData((CFDataRef)jpeg, NULL); NSDictionary *metadata = (NSDictionary *)