Photos: Promised Files vs Export differences

Hi There,

I have an app using PromisedFiles to drag pictures from Photos.
Everything’s almost fine…

It seems that the promised file:

  • has a different size from the exported one,
  • doesn’t contain the same information as a file created with the Photo Export function, I’m missing a lot of metadata.

When exporting the photo I choose maximum quality, selecting any other quality doesn’t create a file with the same size as the promised one.

I’m using MDItemMBS to retrieve the metadata like FileSize, PixelCount, PixelWidth, PixelHeight …

When reading the metadata from the Promised File I have very few information.
When reading the metadata from the “exported” file, I’m getting all metadata.

Is there a way to change the way Photos create the promised file to keep the size consistent ?
Is there another way to get these metadata ?

See below the sizes & metadata for the same file, promised or exported.

PromisedFile from Photos:

Exported from Photos:

Using Xojo 2016r3 on Mac OSX 10.11.6 (El Capitan).
MBS Plugin 163.

Thanks for your help !

Regards,

Olivier

Well, I saw also that Photos app sometimes provides original file and sometimes just a smaller preview file.
That could be a bug in Photos app.

Sadly not, this isn’t limited to Photos either iPhoto and Aperture used to do the same thing.

Thanks Christian and Sam.
I suppose I’ll will have to live with this limitation ;-(

The problem is more the lack of metadata as I’m uploading to a site which has limitation in terms of image size and of pixel count.

Is there a way to calculate the pixel count for a jpeg file ?