bizare output error with png

Started by ctragen, June 12, 2024, 11:07:46 AM

Previous topic - Next topic

ctragen

Hi Guys,

Tried for a few hours to modify creation time and it works perfectly for a png file after a html to canvas operation. Was also trying to modify the "Megapixels": 1.8 entry thinking that was the problem, anyway, removed all that and the creation data works perfrctly but i constantly have this error. Also never managed to modify the megapixel either and gave up on that. All along i though the below was being caused by the megapixel attempt but since i remoevd it, same issue.

Im really stuck thinking maybe there could be an issue at the application layer, hopeing soembody could assist with the log below and perhaps offer some advice on the Megapixels? . God knows we all hate errors ;)

---

Initial EXIF Data:
[{
  "SourceFile": "/tmp/canvasrMN4pW.png",
  "ExifToolVersion": 12.86,
  "FileName": "canvasrMN4pW.png",
  "Directory": "/tmp",
  "FileSize": "450 kB",
  "FileModifyDate": "2024:06:13 00:49:29+10:00",
  "FileAccessDate": "2024:06:13 00:49:29+10:00",
  "FileInodeChangeDate": "2024:06:13 00:49:29+10:00",
  "FilePermissions": "-rw-r--r--",
  "FileType": "PNG",
  "FileTypeExtension": "png",
  "MIMEType": "image/png",
  "ImageWidth": 976,
  "ImageHeight": 1824,
  "BitDepth": 8,
  "ColorType": "RGB with Alpha",
  "Compression": "Deflate/Inflate",
  "Filter": "Adaptive",
  "Interlace": "Noninterlaced",
  "SRGBRendering": "Perceptual",
  "ImageSize": "976x1824",
  "Megapixels": 1.8
}]


Formatted Date to be passed: 2024:06:05 23:26:00

Modify EXIF Command:
/bin/exiftool/Image-ExifTool-12.86/exiftool -v5 -CreationTime='2024:06:05 23:26:00' -overwrite_original /tmp/canvasrMN4pW.png 2\>\&1

Modify EXIF Command Output:
Writing PNG:CreationTime
Writing Keys:CreationTime if tag exists
======== /tmp/canvasrMN4pW.png
Rewriting /tmp/canvasrMN4pW.png...
  Editing tags in: Keys PNG
  Creating tags in: PNG
  FileType = PNG
  FileTypeExtension = PNG
  MIMEType = image/png
PNG IHDR (13 bytes):
      0010: 00 00 03 d0 00 00 07 20 08 06 00 00 00          [....... .....]
PNG sRGB (1 bytes):
      0029: 00                                              [.]
    + PNG:CreationTime = '2024:06:05 23:26:00'
PNG IDAT (55 chunks, total 449563 bytes)
PNG IEND (end of image)
======== 2>&1
    1 image files updated
    1 files weren't updated due to errors


Detailed error information found in the output:
Writing PNG:CreationTime
Writing Keys:CreationTime if tag exists
======== /tmp/canvasrMN4pW.png
Rewriting /tmp/canvasrMN4pW.png...
  Editing tags in: Keys PNG
  Creating tags in: PNG
  FileType = PNG
  FileTypeExtension = PNG
  MIMEType = image/png
PNG IHDR (13 bytes):
      0010: 00 00 03 d0 00 00 07 20 08 06 00 00 00          [....... .....]
PNG sRGB (1 bytes):
      0029: 00                                              [.]
    + PNG:CreationTime = '2024:06:05 23:26:00'
PNG IDAT (55 chunks, total 449563 bytes)
PNG IEND (end of image)
======== 2>&1
    1 image files updated
    1 files weren't updated due to errors

Final EXIF Data:
  ExifToolVersion = 12.86
  FileName = canvasrMN4pW.png
  Directory = /tmp
  FileSize = 450326
  FileModifyDate = 1718203769
  FileAccessDate = 1718203769
  FileInodeChangeDate = 1718203769
  FilePermissions = 33188
  FileType = PNG
  FileTypeExtension = PNG
  MIMEType = image/png
PNG IHDR (13 bytes):
      0010: 00 00 03 d0 00 00 07 20 08 06 00 00 00          [....... .....]
  + [BinaryData directory, 13 bytes]
  | ImageWidth = 976
  | - Tag 0x0000 (4 bytes, int32u[1]):
  |    0000: 00 00 03 d0                                    [....]
  | ImageHeight = 1824
  | - Tag 0x0004 (4 bytes, int32u[1]):
  |    0004: 00 00 07 20                                    [... ]
  | BitDepth = 8
  | - Tag 0x0008 (1 bytes, int8u[1]):
  |    0008: 08                                              [.]
  | ColorType = 6
  | - Tag 0x0009 (1 bytes, int8u[1]):
  |    0009: 06                                              [.]
  | Compression = 0
  | - Tag 0x000a (1 bytes, int8u[1]):
  |    000a: 00                                              [.]
  | Filter = 0
  | - Tag 0x000b (1 bytes, int8u[1]):
  |    000b: 00                                              [.]
  | Interlace = 0
  | - Tag 0x000c (1 bytes, int8u[1]):
  |    000c: 00                                              [.]
PNG sRGB (1 bytes):
      0029: 00                                              [.]
  SRGBRendering =
  - Tag 'sRGB' (1 bytes):
      0000: 00                                              [.]
PNG tEXt (33 bytes):
      0036: 43 72 65 61 74 69 6f 6e 20 54 69 6d 65 00 32 30 [Creation Time.20]
      0046: 32 34 3a 30 36 3a 30 35 20 32 33 3a 32 36 3a 30 [24:06:05 23:26:0]
      0056: 30                                             
[o]
  CreationTime = 2024:06:05 23:26:00
  - Tag 'Creation Time' (19 bytes):
      0000: 32 30 32 34 3a 30 36 3a 30 35 20 32 33 3a 32 36 [2024:06:05 23:26]
      0010: 3a 30 30                                        [:00]
PNG IDAT (55 chunks, total 449563 bytes)
PNG IEND (end of image)


StarGeek

Quote from: ctragen on June 12, 2024, 11:07:46 AMWas also trying to modify the "Megapixels": 1.8 entry thinking that was the problem

Megapixels isn't embedded/editable metadata. It is literally how many pixels are in the image, i.e. the image width x image height / 1,000,000. The only way to change that is to edit and scale the image to a new size.

Quotethe creation data works perfrctly but i constantly have this error.
...
Modify EXIF Command:
/bin/exiftool/Image-ExifTool-12.86/exiftool -v5 -CreationTime='2024:06:05 23:26:00' -overwrite_original /tmp/canvasrMN4pW.png 2\>\&1
...
======== 2>&1
    1 image files updated
    1 files weren't updated due to errors

This line with the equal signs tells you what the problem is.  Exiftool thinks there is a file called "2>&1" that it needs to edit. So there's an error with your redirection of STDERR into STDOUT. Your command shows "2\>\&1" which means you are escaping the > and & symbols so the command line doesn't see them as the redirection characters.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).