AFCP question

Started by ScannerBoy, January 24, 2023, 05:43:46 PM

Previous topic - Next topic

ScannerBoy

As part of getting some work on displaying metadata in JPGs, I have run into some AFCP questions and found a couple of images/files which are alleged to contain AFCP data, but I have not found any way to confirm that or analyze the data if it exists.
The files came from: http://justsolve.archiveteam.org/wiki/AFCP#Sample_files

I am running Exiftool 12.50

When I run Exiftool in the directory with those 2 files, I get:
D:\TestImages\Exiftool> exiftool -afcp:all= .
Error: Not a valid JPG (looks more like a XMP) - ./AFCP.jpg
    1 directories scanned
    0 image files updated
    1 image files unchanged
    1 files weren't updated due to errors

D:\TestImages\Exiftool>


Question: do these file in fact contain AFCP data or is the wiki wrong?
It seems one of the files AFCP.jpg came from
https://github.com/exiftool/exiftool/blob/master/t/images/AFCP.jpg
and even though it carries the extension JPG, the data itself looks like an HTML file.

I have downloaded the spec for AFCP files, but have not been able to find any answer for my question or any other files with such data.

StarGeek

Both files work correctly here.  In this example, you can see that both start with data in the IPTC2 group which doesn't exists after running -afcp:all=
C:\>exiftool -G1 -a -s -iptc:all Y:\!temp\dd\test
======== Y:/!temp/dd/test/AFCP.jpg
[IPTC2]         ApplicationRecordVersion        : 2
[IPTC2]         Category                        : p
[IPTC2]         DateCreated                     : 2005:12:23
[IPTC2]         ObjectName                      : object name
[IPTC2]         Urgency                         : 2
[IPTC2]         SupplementalCategories          : supp cat
[IPTC2]         Keywords                        : keyword
[IPTC2]         SpecialInstructions             : special instructions
[IPTC2]         By-line                         : byline
[IPTC2]         By-lineTitle                    : byline title
[IPTC2]         City                            : city
[IPTC2]         Country-PrimaryLocationName     : country name
[IPTC2]         OriginalTransmissionReference   : otr
[IPTC2]         Headline                        : headline
[IPTC2]         Credit                          : credit
[IPTC2]         Source                          : source
[IPTC2]         CopyrightNotice                 : copy freely
[IPTC2]         Caption-Abstract                : ExifTool AFCP test
[IPTC2]         Writer-Editor                   : caption writer
[IPTC2]         Province-State                  : state
======== Y:/!temp/dd/test/U.S._Department_of_Energy_-_Science_-_298_022_004_(30871102953).jpg
[IPTC]          ApplicationRecordVersion        : 2
[IPTC]          Keywords                        : Sustainability, Recycling & Waste Management, air quality, coating, design, display, hand, packing, photocatalytic oxidation, photochemistry, titanium dioxide, ultraviolet, UV, volatile organic compounds
[IPTC]          DateCreated                     : 1999:10:04
[IPTC]          By-line                         : Warren Gretz
[IPTC]          By-lineTitle                    : NREL Photographer
[IPTC]          Headline                        : NREL-designed photocatalytic air cleaner
[IPTC]          Credit                          : Warren Gretz / NREL
[IPTC]          Source                          : NREL
[IPTC]          Contact                         : Blake, Dan
[IPTC]          Caption-Abstract                : This NREL-designed photocatalytic air cleaner is meant to clean the cabin air in automobiles of volatile organic compounds (VOCs) and bioaerosols (virus, bacterial, etc.).  The principal of operation entails the following:  cabin air passes through this device and VOCs and/or bioaerosols are adsorbed onto the surface of a packing media which is coated with titanium dioxide.  The titanium dioxide is a photocatalytic material that oxidizes compounds on its surface when illuminated with near UV light (having a wavelength of 300 - 365 nm).  The adsorbed compounds are typically oxidized with CO2 and water.
[IPTC2]         Keywords                        : Sustainability, Recycling & Waste Management, air quality, coating, design, display, hand, packing, photocatalytic oxidation, photochemistry, titanium dioxide, ultraviolet, UV, volatile organic compounds
[IPTC2]         DateCreated                     : 1999:10:04
[IPTC2]         Caption-Abstract                : This NREL-designed photocatalytic air cleaner is meant to clean the cabin air in automobiles of volatile organic compounds (VOCs) and bioaerosols (virus, bacterial, etc.).  The principal of operation entails the following:  cabin air passes through this device and VOCs and/or bioaerosols are adsorbed onto the surface of a packing media which is coated with titanium dioxide.  The titanium dioxide is a photocatalytic material that oxidizes compounds on its surface when illuminated with near UV light (having a wavelength of 300 - 365 nm).  The adsorbed compounds are typically oxidized with CO2 and water.
[IPTC2]         ApplicationRecordVersion        : 4
    1 directories scanned
    2 image files read

C:\>exiftool -P -overwrite_original -afcp:all= Y:\!temp\dd\test
    1 directories scanned
    2 image files updated

C:\>exiftool -G1 -a -s -iptc:all Y:\!temp\dd\test
======== Y:/!temp/dd/test/AFCP.jpg
======== Y:/!temp/dd/test/U.S._Department_of_Energy_-_Science_-_298_022_004_(30871102953).jpg
[IPTC]          ApplicationRecordVersion        : 2
[IPTC]          Keywords                        : Sustainability, Recycling & Waste Management, air quality, coating, design, display, hand, packing, photocatalytic oxidation, photochemistry, titanium dioxide, ultraviolet, UV, volatile organic compounds
[IPTC]          DateCreated                     : 1999:10:04
[IPTC]          By-line                         : Warren Gretz
[IPTC]          By-lineTitle                    : NREL Photographer
[IPTC]          Headline                        : NREL-designed photocatalytic air cleaner
[IPTC]          Credit                          : Warren Gretz / NREL
[IPTC]          Source                          : NREL
[IPTC]          Contact                         : Blake, Dan
[IPTC]          Caption-Abstract                : This NREL-designed photocatalytic air cleaner is meant to clean the cabin air in automobiles of volatile organic compounds (VOCs) and bioaerosols (virus, bacterial, etc.).  The principal of operation entails the following:  cabin air passes through this device and VOCs and/or bioaerosols are adsorbed onto the surface of a packing media which is coated with titanium dioxide.  The titanium dioxide is a photocatalytic material that oxidizes compounds on its surface when illuminated with near UV light (having a wavelength of 300 - 365 nm).  The adsorbed compounds are typically oxidized with CO2 and water.
    1 directories scanned
    2 image files read

Are you sure you downloaded the files correctly? The (looks more like a XMP) error sounds like you just right clicked/saved from archiveteam.org page and saved the HTML of the git hub page, when you needed to click through and download the file from there


I'm not sure what might be wrong with the Wikimedia image.  I clicked through and saved it from there and it worked correctly.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

ScannerBoy

Thank you very much for looking at this :-)
It was a matter of downloading, though I don't recall having this much trouble downloading images before.

The only remaining question at this time: is there a way to identify that the data came from the ACFP section in the target file, or would I have to look for that signature myself?

Or to put things more generically, for tags which can occur in multiple places with apparently different properties, is there a way to have Exiftool identify in more detail, just where the data was found.

One of the tags that raised this question for me was a look at the ISO tag in the database output via XML

StarGeek

I don't think there's a way to do that, though I could be wrong.  Phil will have to comment on this but he's away until next week.  Checking for the AFCP with -if "$AFCP:All" works for the wikipedia file, but not the AFCP.jpg file.

In my experience, IPTC tags in AFCP will have a group that includes a number, e.g. IPTC2, IPTC3, etc. This seems to happen even when it's the only IPTC in the file, as shown by the AFCP.jpg file.  In some baldly written files, there can be a lot of IPTC groups.  I've got a file that has 5 separate IPTC groups and I've seen one with 9 groups before.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

The -G5 option may be used to see in more detail where the metadata is located:

> exiftool -G5 -a -iptc:all AFCP.jpg
[JPEG-Trailer-AFCP-IPTC] Application Record Version: 2
[JPEG-Trailer-AFCP-IPTC] Category               : p
[JPEG-Trailer-AFCP-IPTC] Date Created           : 2005:12:23
[JPEG-Trailer-AFCP-IPTC] Object Name            : object name
[JPEG-Trailer-AFCP-IPTC] Urgency                : 2
[JPEG-Trailer-AFCP-IPTC] Supplemental Categories: supp cat
[JPEG-Trailer-AFCP-IPTC] Keywords               : keyword
[JPEG-Trailer-AFCP-IPTC] Special Instructions   : special instructions
[JPEG-Trailer-AFCP-IPTC] By-line                : byline
[JPEG-Trailer-AFCP-IPTC] By-line Title          : byline title
[JPEG-Trailer-AFCP-IPTC] City                   : city
[JPEG-Trailer-AFCP-IPTC] Country-Primary Location Name: country name
[JPEG-Trailer-AFCP-IPTC] Original Transmission Reference: otr
[JPEG-Trailer-AFCP-IPTC] Headline               : headline
[JPEG-Trailer-AFCP-IPTC] Credit                 : credit
[JPEG-Trailer-AFCP-IPTC] Source                 : source
[JPEG-Trailer-AFCP-IPTC] Copyright Notice       : copy freely
[JPEG-Trailer-AFCP-IPTC] Caption-Abstract       : ExifTool AFCP test
[JPEG-Trailer-AFCP-IPTC] Writer-Editor          : caption writer
[JPEG-Trailer-AFCP-IPTC] Province-State         : state

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Heh, I think I tried every G option except 5
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

ScannerBoy

Thank you; good to know there is a way :-)