Platforms to show: All Mac Windows Linux Cross-Platform
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Icon Service | MBS Picture Plugin | Yes | No | No | Yes, macOS only | No |
Notes:
Returns 0 for successfull and any Mac OS error code on a problem.
Returns -1 on Windows.
This function is called automatically when adding or removing an icon.
If you add a folder icon, use this function to update the Finder to display it.
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Icon Service | MBS Picture Plugin | 3.3 | Yes | Yes | No | Yes | No |
Example:
Backdrop=SpecialFolder.Desktop.IconImageMBS(512)
May return a picture which is smaller as requested if the given picture size is not available. (Changed in v5.3 to return the requested size)
On Windows the icon picture is scaled to the requested size. (Actually the plugin can only get 32bit pixels wide icons on Windows as maximum)
Good sizes on Mac OS are 16, 32, 48 and 128 pixels.
Returns nil on low memory.
Version 8.6: Now reads the 32bit image data if possible.
You can pass flags for Windows options:
SHGFI_ADDOVERLAYS | = &h20 | Apply the appropriate overlays to the file's icon. |
SHGFI_LINKOVERLAY | = &h8000 | Adds the link overlay to the file's icon. |
SHGFI_OPENICON | = 2 | Retrieve the file's open icon |
SHGFI_SELECTED | = &h10000 | Blend the file's icon with the system highlight color. |
This function can fail if the file does not exist.
Added 1024 pixel support in 12.3 plugins.
On Windows, it may be that you get a 256 pixel icon with small icon on top left. This is simply how windows handles the case when no big icon is available.
Some examples which use this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Icon Service | MBS Picture Plugin | 3.3 | Yes | Yes | No | Yes | No |
Example:
Backdrop=SpecialFolder.Desktop.IconMaskMBS(512)
May return a picture which is smaller as requested if the given picture size is not available. (Changed in v5.3 to return the requested size)
On Windows the icon picture is scaled to the requested size. (Actually the plugin can only get 32bit pixels wide icons on Windows as maximum)
Good sizes on Mac OS are 16, 32, 48 and 128 pixels.
Returns nil on low memory.
Please use with IconImageMBS and not with IconMBS function.
Version 8.6: Now reads the 8 bit alpha values if possible.
You can pass flags for Windows options:
SHGFI_ADDOVERLAYS | = &h20 | Apply the appropriate overlays to the file's icon. |
SHGFI_LINKOVERLAY | = &h8000 | Adds the link overlay to the file's icon. |
SHGFI_OPENICON | = 2 | Retrieve the file's open icon |
SHGFI_SELECTED | = &h10000 | Blend the file's icon with the system highlight color. |
This function can fail if the file does not exist.
Added 1024 pixel support in 12.3 plugins.
On Windows, it may be that you get a 256 pixel icon with small icon on top left. This is simply how windows handles the case when no big icon is available.
Some examples which use this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
method | Icon Service | MBS Picture Plugin | Yes | Yes | No | Yes | No |
Example:
Backdrop=SpecialFolder.Desktop.IconMBS(512)
// newer way for Mac apps:
// get image
dim n as NSImageMBS = NSWorkspaceMBS.iconForFile(SpecialFolder.desktop)
// set the size we want
n.setSize 512,512
// make a copy as picture
Backdrop = n.CopyPictureWithMask
Changed in plugin version 7.7 to return a picture with mask of the given size.
On Windows the icon picture is scaled to the requested size. (Actually the plugin can only get 32bit pixels wide icons on Windows as maximum)
Version 8.6: Now reads the 32bit image data with 8 bit alpha values if possible.
You can pass flags for Windows options:
SHGFI_ADDOVERLAYS | = &h20 | Apply the appropriate overlays to the file's icon. |
SHGFI_LINKOVERLAY | = &h8000 | Adds the link overlay to the file's icon. |
SHGFI_OPENICON | = 2 | Retrieve the file's open icon |
SHGFI_SELECTED | = &h10000 | Blend the file's icon with the system highlight color. |
This function can fail if the file does not exist.
Please note that icons on alias files takes much longer to get than normal files.
Added 1024 pixel support in 12.3 plugins.
On Windows, it may be that you get a 256 pixel icon with small icon on top left. This is simply how windows handles the case when no big icon is available.
Some examples which use this method:
The items on this page are in the following plugins: MBS Picture Plugin.
Links
MBS FileMaker Plugins