ExifTool Forum

ExifTool => Newbies => Topic started by: Raffie77 on January 22, 2019, 09:43:02 AM

Title: Find images that are more then 16 megapixels
Post by: Raffie77 on January 22, 2019, 09:43:02 AM
Hi people,
I sync my photo's with google drive and I want to switch from original photo's to high quality photo's, that means if I have a photo of 16 megapixels or higher, then google makes it 16 megapixels.
I don't have much photo's that are bigger then 16mp (I think)

so is there a way to show all photo's in my photo root folder that are bigger then 15.9 megapixels, and can I output that in a list that shows the filename with full pathname and the megapixels?

regards,

Raffie
Title: Re: Find images that are more then 16 megapixels
Post by: Phil Harvey on January 22, 2019, 10:37:43 AM
Hi Raffie,

Try this:

exiftool -q -s3 -filepath -if "$imagewidth * $imageheight >= 16000000" DIR

- Phil

Edit:  Oh, I see you also want the megapixels listed... That will take some more thought. Give me a minute.

OK.  Try this.

exiftool -p "$filepath ${imagewidth;$_*=$self->GetValue('ImageHeight');$_/=1e6}" -if "$imagewidth * $imageheight >= 16000000" DIR
Title: Re: Find images that are more then 16 megapixels
Post by: Raffie77 on January 22, 2019, 10:42:36 AM
Hi Phil

I used this code now:

exiftool -r -n -p '${directory} ${filename} ${megapixels}' -if '$megapixels >= 16'  -ext jpg .

that works

thanks
Title: Re: Find images that are more then 16 megapixels
Post by: Phil Harvey on January 22, 2019, 10:44:21 AM
Right.  Doh.  Forgot about the pre-defined Megapixels Composite tag.
Title: Re: Find images that are more then 16 megapixels
Post by: Raffie77 on January 22, 2019, 10:50:20 AM
yeah someone else in this topic showed me how to do that, and I tweaked it a bit, but that message is gone apparently.

many thanks to that person who showed me that
Title: Re: Find images that are more then 16 megapixels
Post by: Phil Harvey on January 22, 2019, 10:51:57 AM
I saw that message from Alan Clifford briefly, but he must have deleted it for some reason.

- Phil
Title: Re: Find images that are more then 16 megapixels
Post by: Raffie77 on January 22, 2019, 10:56:17 AM
ok,

well thanks Alan Clifford and Phill for your very quick reaction
I'm scanning 32000 files on a external harddrive connected with USB 3
so it's gonna take a while  ;D
Title: Re: Find images that are more then 16 megapixels
Post by: Alan Clifford on January 22, 2019, 11:12:24 AM
I posted using filesize, realized it wasn't megapixels, so deleted.

Tried again with megapixels,  the forum told me that someone had already replied, so I deleted my post, which had a later time. But it must have appeared earlier.

Title: Re: Find images that are more then 16 megapixels
Post by: Phil Harvey on January 22, 2019, 11:18:56 AM
Well, thanks Alan.  It turned out to do the trick.

- Phil