ExifTool Forum

ExifTool => Newbies => Topic started by: w64bit on March 03, 2025, 06:39:48 AM

Title: Search by bit
Post by: w64bit on March 03, 2025, 06:39:48 AM
I am trying to search PNG files by bit. No results.
Can anyone please take a look over these commands, please?
Thank you

exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 1" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_1-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 8" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_8-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 10" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_10-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 12" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_12-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 16" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_16-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 1 and $BitsPerSample eq 32" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\GRAY_32-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 3 and $BitsPerSample eq 8" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\RGB_8-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 3 and $BitsPerSample eq 10" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\RGB_10-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 3 and $BitsPerSample eq 12" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\RGB_12-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 3 and $BitsPerSample eq 16" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\RGB_16-bit.txt
exiftool.exe -ext png -if "$SamplesPerPixel eq 4 and $BitsPerSample eq 8" -r -s3 -filename -d "%d%f.%e" "D:\FOLDER" > D:\FOLDER\RGB_32-bit.txt
Title: Re: Search by bit
Post by: Phil Harvey on March 03, 2025, 07:35:11 AM
We need to know what command shell you are using.  These commands look good to me for Windows CMD, but would probably fail under PowerShell.

- Phil
Title: Re: Search by bit
Post by: StarGeek on March 03, 2025, 09:17:15 AM
Always pay attention to the highlighting in Powershell (https://exiftool.org/forum/index.php?msg=80581). And PS quoting is different than every other command line.
Title: Re: Search by bit
Post by: w64bit on March 03, 2025, 11:14:05 AM
I am using them only on Windows CMD.
With TIF, it's working.
With PNG, no.
Title: Re: Search by bit
Post by: Phil Harvey on March 03, 2025, 11:17:02 AM
Check to see what tags are available in your PNG images:

exiftool -s FILE.png

- Phil
Title: Re: Search by bit
Post by: w64bit on March 03, 2025, 11:20:39 AM
Only:
BitDepth
ColorType

No:
SamplesPerPixel
BitsPerSample
Title: Re: Search by bit
Post by: StarGeek on March 04, 2025, 01:51:07 PM
You are looking for EXIF tags, which are not very common in PNG files.