Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : gui2bitmap details
Login with GitLab


get a bitmap image of a graphical figure or interface, including its uicontrols, nay window borders
(15123 downloads for this version - 29007 downloads for all versions)
Samuel Gougeon
Samuel Gougeon
Creation Date
August 9, 2019
Source created on
Scilab 6.0.x
Binaries available on
Scilab 5.5.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Scilab 6.0.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Scilab 6.1.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("gui2bitmap")
gui2bitmap(…) takes a snapshot of the given graphical figure and stores it in
an image file. .png .jpg .gif and .bmp output encodings are supported.

It is a stand-alone Scilab function using only the JVM embedded in Scilab.
It does not require any external software,  nor any hardcode compilation.
It aims to remedy to xs2png(…), xs2jpg(…), xs2gif(…), and xs2bmp(…).
Unlike them, it is able to
* include uicontrols (if any) in the image, as they appear on the GUI figure;
* snapshot the whole window embedding the figure, including the window 
  menus tools and status bars, and borders.

gui2bitmap(idFig, filename)
gui2bitmap(idFig, filename, withBorders)

gui2bitmap("setMenu", parentHandle)

gui2bitmap("setBorders", borders)
gui2bitmap("setScale", scale)


idFig      : handle of the figure
filename   : pathname to the output image file
withBorders: boolean
borders    : vector of 3 booleans
             [left_border, bottom_border, right_border]
scale      : Screen display zoom factor, in percentage

PDF page:

Bugs reports, comments:
Every user report is welcome, for success and failure, in particular on the
following OSes: Win10, Linux, MacOS X with/without retina display:
Files (6)
[204.69 kB]
Source code archive

[408.59 kB]
OS-independent binary for Scilab 5.5.x

[416.16 kB]
OS-independent binary for Scilab 6.0.x
CHANGES 1.1 => 1.2
* "setMenu", "setScale" and "setBorders" syntaxes added.
* gui2bitmap() now works as well on Linux (and MacOS X: not tested)
* Unit tests added.
* Tested on Windows 7 1920x1080 (with scale = 100|125|150%), 1600x900, 1280x720
* Tested on Linux Fedora 24

[416.62 kB]
OS-independent binary for Scilab 6.1.x

[365.28 kB]
Miscellaneous file
gui2bitmap() online help page (english)
[367.80 kB]
Miscellaneous file
gui2bitmap() page d'aide en ligne (french)
News (0)
Comments (1)     Leave a comment 
Comment from manish joshi -- June 1, 2020, 11:08:27 AM    
This comment has been deleted.
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.