Embedding Quotation Marks in IPTC

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
arcking
Posts: 10
Joined: 2011-06-10T11:29:39-07:00
Authentication code: 8675308

Embedding Quotation Marks in IPTC

Post by arcking »

Is there a way to embed quotation marks in the IPTC data of a TIFF image? I've been using the following command in a script

Code: Select all

convert $image +profile 8bim +comment -profile 8BIMTEXT:$iptc $image
along with a text file of the following format

Code: Select all

8BIM#1028="IPTC"
2#0="�"
2#120#Caption="Caption"
2#105#Headline="Headline"
2#55#Created Date="00000000"
2#115#Source="Source"
The problem is when the text I'd like to insert contains as quotation mark - ImageMagick assumes that the quotation mark indicates the end of the field. Is there any way to include a quotation mark in the iptc data? An escape character or something along that line?
arcking
Posts: 10
Joined: 2011-06-10T11:29:39-07:00
Authentication code: 8675308

Re: Embedding Quotation Marks in IPTC

Post by arcking »

Problem solved. I'll include the following for other's reference.

" will create quotation marks in the iptc data

Or, if you're using PHP and need all characters that may cause issues replaced, look into using the htmlentities command.
http://us2.php.net/manual/en/function.htmlentities.php
kalkulatorkredytowy
Posts: 1
Joined: 2012-07-22T15:03:04-07:00
Authentication code: 15

Re: Embedding Quotation Marks in IPTC

Post by kalkulatorkredytowy »

Cool stuff. Didn't know that """ does that. Thanks
Post Reply