Import crops from Picasa

Post Reply
regex
Posts: 9
Joined: 04 Feb 18 17:57

Import crops from Picasa

Post by regex » 12 Feb 18 15:27

I am evaluating PSu as a replacement for Picasa. I have a lot of JPEG cropped photos (little birds shooted with telephoto) and it is essential that I can recover all these crops.

For this I tried the following process:

1. get crop values from picasa file "picasa.ini" with a python script

2. make a sidecar XMP: I edited a raw file in PSu to get a XMP template and keep only the crop part (see attachment)

3. Import in PSu: it seems that the batch "import XMP file" does not work with jpegs, so I used the script found in the repository "Import from sidecar XMP file".
At first look the metadatas are here, see output exiftool:

Code: Select all

    ---- XMP-iles ----
    Is Enabled                      : 1
    Recipe Name                     : Palette[attachment=0]psu_crop.xmp[/attachment]
    Crop Recipe Enabled             : 1
    Crop Friendly Name              : ROGNER
    Crop Opacity                    : 255
    Crop Blend Mode                 : 1
    Crop Left                       : +0.5
    Crop Top                        : +0.5
    Crop Right                      : +0.5
    Crop Bottom                     : +0.5
    Crop Crop Angle                 : +0
    Crop Crop Rotate Method         : +0
I compared with another image cropped in PSu and I see no difference, and other metadas are preserved.

Alas, when I click on the thumbmail no image at all, something is broken.

Have I missed something ? do you have other solutions to propose ?
Attachments
psu_crop.xmp
(1013 Bytes) Downloaded 15 times

Hert
Posts: 20991
Joined: 13 Sep 03 7:24

Re: Import crops from Picasa

Post by Hert » 12 Feb 18 21:10

regex wrote:
12 Feb 18 15:27
Alas, when I click on the thumbmail no image at all, something is broken.
Your XMP file has this:

Code: Select all

 <ilesCrop:Left>+0.5</ilesCrop:Left>
<ilesCrop:Top>+0.5</ilesCrop:Top>
<ilesCrop:Right>+0.5</ilesCrop:Right>
<ilesCrop:Bottom>+0.5</ilesCrop:Bottom>
Cropping is defined in fractions; meaning the units range from 0.0 to 1.0 (0% to 100%). You have a crop defined from left 0.5 to right 0.5, which means that it has no width. The same for Top and Bottom. The output image will hence be 0x0px...empty. And that's what you see

Set right to a value higher than left and bottom higher than top.

Does that help?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

regex
Posts: 9
Joined: 04 Feb 18 17:57

Re: Import crops from Picasa

Post by regex » 13 Feb 18 0:18

Of course, I am an idiot !
And the best is that I put these silly values by hand just to test the xmp, if I had let my python script do the job it would have been ok.

Thanks for your quick response.

regex
Posts: 9
Joined: 04 Feb 18 17:57

Re: Import crops from Picasa

Post by regex » 22 Feb 18 16:25

Arghhhh, it does not work anymore, after executing script "Import from sidecar XMP file" my jpeg files have been removed !!! Luckily I'm still experimenting in a test directory.

A priori I did not change anything, I just migrated under V4, could that explain it ?

Hert
Posts: 20991
Joined: 13 Sep 03 7:24

Re: Import crops from Picasa

Post by Hert » 22 Feb 18 16:36

Maybe you can share your script here so we can check what it’s doing?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

regex
Posts: 9
Joined: 04 Feb 18 17:57

Re: Import crops from Picasa

Post by regex » 22 Feb 18 17:08

It's not mine, it's the one in repository http://repository.idimager.com/openreso ... 3CE16B7052

Hert
Posts: 20991
Joined: 13 Sep 03 7:24

Re: Import crops from Picasa

Post by Hert » 22 Feb 18 18:10

That script will not delete from the catalog. This is what it does:

Code: Select all

  procedure ImportXMPSidecarFor(AImage: TImageItem);
  var
    AXmp: TXMP;
    ASidecar: WideString;
  begin
    ASidecar := WideChangeFileExt(AImage.FileName, '.xmp');

    AXmp := TXMP.Create(False);
    AXmp.LoadFromFile(ASidecar);
    PublicCatalog.SaveXMPForImage(AImage, AXmp, PublicOptions.CachedXMP);
    PublicCatalog.ReadXMPForImageAdvanced(AImage, PublicOptions.XMPSyncReadSettings, AXmp);
    AXmp.Free;
  end;
Basically 1. Load XMP, 2. Store XMP to the catalog, 3. Process the XMP details to the catalog (that is where the catalog labels are created from the keywords etc)

How did you check that the file was no longer in the Catalog? Did you look in Folders?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

regex
Posts: 9
Joined: 04 Feb 18 17:57

Re: Import crops from Picasa

Post by regex » 22 Feb 18 21:50

I did not say that the file was no longer in the catalog - it was fine in idCatalogItem table - but that the JPEG file had disappeared from the folder.

But I found this: there was a duplicate in the catalog, same picture in different folders, that's why it was the mess.

By removing this duplicate everything works again.

Closed

regex
Posts: 9
Joined: 04 Feb 18 17:57

Re: Import crops from Picasa

Post by regex » 02 Mar 18 2:04

I added import of straighten, fillflash, highlights, shadows.

My work is available in the bitbucket repository

Post Reply