Create an album of thumbnail size photos from Apple Photoslibrary

Started by kkaiser, April 06, 2020, 12:11:18 PM

Previous topic - Next topic

StarGeek

I'm not sure what to suggest.  That command works properly.  If it isn't finding anything, then there probably isn't any files of that size.
* 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).

Phil Harvey

The small jpg you tested was in the directory

/Volumes/Photos by Year/photos-by-year/Small/

yet you are running the command on this directory

/Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals/

are you sure there are small images in the "originals" directory?  ExifTool is saying that there aren't.

- 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 ($).

kkaiser

This is the second image in the /originals/0 file, its only 75x75, or am I reading it wrong?

% exiftool /Volumes/Photos\ by\ Year/photos-by-year/PastYears.photoslibrary/originals/0/023820A9-7D52-4D40-AB0F-322BFBFE6205.jpeg
ExifTool Version Number         : 11.93
File Name                       : 023820A9-7D52-4D40-AB0F-322BFBFE6205.jpeg
Directory                       : /Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals/0
File Size                       : 2.7 kB
File Modification Date/Time     : 2020:01:22 17:51:52-06:00
File Access Date/Time           : 2020:04:07 21:03:00-05:00
File Inode Change Date/Time     : 2020:04:07 14:01:00-05:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Exif Byte Order                 : Little-endian (Intel, II)
Modify Date                     : 2012:02:28 12:19:17
Artist                          : We Are The Rhoads 1
Copyright                       : We Are The Rhoads
Image Width                     : 75
Image Height                    : 75
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                      : 75x75
Megapixels                      : 0.006

Phil Harvey

So what happens when you run this command?:

exiftool -if '$ImageWidth<=240 and  $ImageHeight<=180' '-directory=/Volumes/Photos by Year/photos-by-year/Small2' -r '/Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals/0/023820A9-7D52-4D40-AB0F-322BFBFE6205.jpeg'

- 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 ($).

kkaiser

% exiftool -if '$ImageWidth<=240 and  $ImageHeight<=180' '-directory=/Volumes/Photos by Year/photos-by-year/Small2' -r '/Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals/0/023820A9-7D52-4D40-AB0F-322BFBFE6205.jpeg'

    1 image files updated

Now I'm even more confused.

kkaiser

I'm running (yes running):

exiftool -if '$ImageWidth<=240 and  $ImageHeight<=180' '-directory=/Volumes/Photos by Year/photos-by-year/Small2' -r '/Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals'

And its working. In just a few minutes it has identified and moved 1140 small photos to the Small2 file.

It looks like the only difference is the / at the end of originals. Is that true?


kkaiser

It finished;

% exiftool -if '$ImageWidth<=240 and  $ImageHeight<=180' '-directory=/Volumes/Photos by Year/photos-by-year/Small2' -r '/Volumes/Photos by Year/photos-by-year/PastYears.photoslibrary/originals'                                           

   17 directories scanned
101251 files failed condition
9350 image files updated


Phil Harvey

The slash at the end won't matter.

Ah... The problem was that you had a funny Unicode non-breaking space in your -if condition:

'$ImageWidth<=240 and  $ImageHeight<=180'

Immediately after the "and" is the funny character.  You can get this by copying and pasting from your web browser.

If I copy and paste your bad command and add the -v option, I see this warning:

Condition: Unrecognized character \xC2; marked by <-- HERE after }<=240 and<-- HERE near column 29

- 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 ($).

StarGeek

That was probably my fault.  I usually make sure I don't have double spaces when I list a command here because the forum does that.  I didn't do that in the example I gave.  Fixed.
* 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).