Bug 396669

Summary: Problem with Metadata in JPEG Export
Product: [Applications] krita Reporter: Kenneth Evans <ken>
Component: File formatsAssignee: amyspark <amy>
Status: RESOLVED WORKSFORME    
Severity: normal CC: amy, griffinvalley, halla, tamtamy.tymona
Priority: NOR    
Version: 4.1.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kenneth Evans 2018-07-19 15:00:48 UTC
If I export a KRA file as a JPEG and check all the boxes in the Metadata tab, what I gets seems to be non-standard and gives an error in Exiftool, arguably the most used EXIF metadata tool.  It will not let me add copyright information, for example.  There is no problem if I do not check the Store Document Metadata and Sign with Author Profile Data.

Either with or without the information I don't see whatever it is writing for Author Data or anything besides IPTC:Object Name.  No EXIF and no XMP.

The error I get is from Exiftool is:
Warning: Multiple APP1 EXIF records - C:/Users/evans/Documents/Krita/Coons 2018.jpg
Error: Format error in file - C:/Users/evans/Documents/Krita/Coons 2018.jpg
    0 image files updated
    1 files weren't updated due to errors
Comment 1 Halla Rempt 2018-09-01 13:23:08 UTC
Hm, looks like we lost the author profile creation dialog as well. Our metadata system hasn't been maintained since Cyrille left the project around 2010, I think :-(
Comment 2 wolthera 2018-09-02 09:42:32 UTC
Does this also happen if you uncheck "embed document metadata" and "sign with author rofile data"? Because if it doesn't then it is my fault.
Comment 3 Tiar 2019-09-23 17:06:25 UTC
I just get this:

JPEG APP1 (6 bytes):
  Warning = Malformed APP1 EXIF segment

And it is in fact if and only if I select "Store Document Metadata". I don't see any information from Layer->Edit Metadata being written inside the file anyway though.

Btw Tool information is stored correctly:
JPEG APP1 (74 bytes):
  ExifByteOrder = II
  + [IFD0 directory with 2 entries]
  | 0)  Software = Krita 4.3.0-prealpha
  | 1)  ModifyDate = 2019-09-23
Comment 4 amyspark 2021-08-22 19:27:01 UTC
Tested today with commit fdf870c11d, ExifTool 12.30, a fully loaded author profile, and the example file from bug 434393. Duplicated the imported layer, painted a bit, saved as KRA, then exported the resulting file as JPEG. No errors occurred:

ExifTool Version Number         : 12.30
File Name                       : in_flight.jpg
Directory                       : C:/Users/<snip>/Desktop
File Size                       : 90 KiB
File Modification Date/Time     : 2021:08:22 18:40:28+00:00
File Access Date/Time           : 2021:08:22 19:19:25+00:00
File Creation Date/Time         : 2021:08:22 18:40:22+00:00
File Permissions                : -rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 72
Y Resolution                    : 72
Exif Byte Order                 : Little-endian (Intel, II)
Artist                          : <snip>
Current IPTC Digest             : 89bb8e35f55f85551b548982410e4c30
By-line                         : <snip>
Profile CMM Type                : Little CMS
Profile Version                 : 2.3.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2004:08:13 12:18:06
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : Little CMS
Device Model                    :
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : Little CMS
Profile ID                      : 7fb30d688bf82d32a0e748daf3dba95d
Device Mfg Desc                 : lcms generated
Profile Description             : sRGB
Device Model Desc               : sRGB
Media White Point               : 0.95015 1 1.08826
Red Matrix Column               : 0.43585 0.22238 0.01392
Blue Matrix Column              : 0.14302 0.06059 0.71384
Green Matrix Column             : 0.38533 0.71704 0.09714
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Chromaticity Channels           : 3
Chromaticity Colorant           : Unknown (0)
Chromaticity Channel 1          : 0.64 0.33
Chromaticity Channel 2          : 0.3 0.60001
Chromaticity Channel 3          : 0.14999 0.06
Profile Copyright               : no copyright, use freely
Image Width                     : 1920
Image Height                    : 1080
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1920x1080
Megapixels                      : 2.1
-- press ENTER --