Author Topic: Canon PowerShot ELPH 330 HS MakerNotes support  (Read 12939 times)

Jonathan

  • Jr. Member
  • **
  • Posts: 13
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #15 on: May 26, 2013, 08:49:14 PM »
What thumbnail? Is your tool calculating this 72 value and discarding the source value?
I don't think the destination file has a thumbnail, or at least I didn't specifically create it unless Imager does that by default.

Jonathan

  • Jr. Member
  • **
  • Posts: 13
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #16 on: May 26, 2013, 09:16:17 PM »
I know nothing of file formats, so don't know how to interpret. Here's the output for the 3 files:

Original:
[IFD1]          Compression                     : JPEG (old-style)
[IFD1]          X Resolution                    : 180
[IFD1]          Y Resolution                    : 180
[IFD1]          Resolution Unit                 : inches
[IFD1]          Thumbnail Offset                : 5632
[IFD1]          Thumbnail Length                : 4327

Imager file has no IFD1

Final file:
[IFD1]          Compression                     : JPEG (old-style)
[IFD1]          X Resolution                    : 72
[IFD1]          Y Resolution                    : 72
[IFD1]          Resolution Unit                 : inches
[IFD1]          Thumbnail Offset                : 4968
[IFD1]          Thumbnail Length                : 4327

If a thumbnail is being copied over by the SetNewValuesFromFile(), that's not a good thing because it would have the wrong orientation. Might be better to exclude it from the copy (how?). That said, maybe I don't care since nothing I use would display it anyway.

Jonathan

  • Jr. Member
  • **
  • Posts: 13
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #17 on: May 26, 2013, 09:29:29 PM »
Of course, the tool is discarding the MPF group entirely. I notice it says (in the original file):
---- MPF ----
MPFVersion               : 0100
NumberOfImages           : 2
MPImageFlags (1)         : Dependent parent image
MPImageFormat (1)        : JPEG
MPImageType (1)          : Baseline MP Primary Image
MPImageLength (1)        : 3759050
MPImageStart (1)         : 0
DependentImage1EntryNumber (1) : 2
DependentImage2EntryNumber (1) : 0
MPImageFlags             : Dependent child image
MPImageFormat            : JPEG
MPImageType              : Large Thumbnail (full HD equivalent)
MPImageLength            : 322715
MPImageStart             : 3759104
DependentImage1EntryNumber : 0
DependentImage2EntryNumber : 0

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15224
    • ExifTool Home Page
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #18 on: May 27, 2013, 07:35:29 AM »
Do this to exclude the thumbnail from being copied:

$cleanExifTool->SetNewValuesFromFile($originalFilePath, '-thumbnailimage');

This is the only tag with a default write group of IFD1, so if you don't write this then ExifTool will not populate the other mandatory IFD1 tags with default values.

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

Jonathan

  • Jr. Member
  • **
  • Posts: 13
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #19 on: May 27, 2013, 01:31:35 PM »
I restricted the groups as well, so my final command is this:
SetNewValuesFromFile($originalFilePath, '*:*', '-ThumbnailImage')

dma_k

  • Newbie
  • *
  • Posts: 5
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #20 on: January 04, 2017, 06:34:31 AM »
You really can't call SetNewValue() to do this.  You have the correct syntax for SetNewValuesFromFile().  (either "makernotes:*" or "makernotes:all" should work).  But you should also set the Make and Model, like this:
Actually I've tried makernotes:* as tag argument for SetNewValuesFromFile() but it didn't work (Image::ExifTool v10.37). Only makernotes works fine. Would be nice if makernotes:* and makernotes:all are aliases for makernotes just for consistency.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15224
    • ExifTool Home Page
Re: Canon PowerShot ELPH 330 HS MakerNotes support
« Reply #21 on: January 04, 2017, 07:03:26 AM »
MakerNotes:* and MakerNotes have very different functionality.  MakerNotes:* copies the makernotes tags individually (and hence won't create a makernote block if it doesn't already exist), and MakerNotes copies the makernotes as a block.

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