Icon of files, volumes, apps
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 121
- Joined: Thu Mar 27, 2008 10:19 am
Icon of files, volumes, apps
There's a way to import the icon of an app or a volume, to display it as imagesource in a list (the files, the folders) ?
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Icon of files, volumes, apps
Is your screenshot from something inside a Livecode stack, or just from the Macintosh operating system's Finder?
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Icon of files, volumes, apps
Hi.
You can always take a screen shot of the icon and get a PNG. Not sure if there is a more "direct" way.
Craig Newman
You can always take a screen shot of the icon and get a PNG. Not sure if there is a more "direct" way.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Icon of files, volumes, apps
A more direct way would be to use LiveCode Builder to talk directly to the OS APIs to obtain that image data. A bit of work, but doable.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Icon of files, volumes, apps
You can extract the icons this way:
- Import the screenshot image in Livecode
- Use another empty image as rectangle, call it "borders". Place it where you want to extract the image.
Code: Select all
put the rect of image "borders" into temp import snapshot from rect temp of this card
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Icon of files, volumes, apps
Max, that is awesome and simple. I am tucking it away for future use