Pim icon indicating copy to clipboard operation
Pim copied to clipboard

[Feature Request] Resolution and Size in Status Bar

Open fuguesoft opened this issue 6 months ago • 3 comments

I was looking through the code to see how you were populating the status bar but couldn't suss it out.

I wanted to add a field to display image resolution and size. How could I do this?

Thanks

fuguesoft avatar Sep 16 '25 06:09 fuguesoft

The function where the text for the title- and statusbar is generated is update_info(). But the information you want to display needs to be generated. As far as I remember it is currently not available. File size should be easy with os.path.getsize. Dunno for the image resolution. But I assume there is a function in GdkPixbuf or Gdk. Hope that helps

Narrat avatar Sep 16 '25 18:09 Narrat

Thank you! I did this earlier and figured I could do it with a shell script

file *.png | grep '[0-9]* x [0-9]*' | string split ',' | grep '[0-9]* x [0-9]*'

this will take all the *.png in the current directory and output all their resolutions on each line. Don't know much about Gdk however

fuguesoft avatar Sep 17 '25 00:09 fuguesoft

Or even better:

fd -e jpg -e png -x identify {} | awk '{print $3}'

find could be used instead of fd-find and identify and awk are pretty standard on posix systems.

fuguesoft avatar Sep 27 '25 19:09 fuguesoft