Forum > macOS / Mac OS X
Hoe to get the application icon for a specific extension
havezet:
I need to extract the os icon for a specific file extension, for instance the icon of the Preview.app for a JPG (as is registered on a default osx installation). I need this icon in a TBitmap.
Does anyone know where to get started?
Thank you
Phil:
jpeg.icns and many others are in /Applications/Preview.app/Contents/Resources.
These icon files are associated with Preview via its Info.plist file.
Thanks.
-Phil
havezet:
Thank you Phil, so where I should find the icon. But how would I know in which app folder I should check? Is there a way to query the OS for the application(s) that are associated with an extension? Or should I query every .app folder for the plist file individually to check if it is associated with a specific extension (hope not).
Thanks
Phil:
I'm afraid I don't understand what you're trying to do. Or why.
Thanks.
-Phil
Mando:
Hello,
try this
http://forum.lazarus.freepascal.org/index.php?topic=2140.0
I use it, and works...
regards
Navigation
[0] Message Index
[#] Next page