GeeXLab 0.19.0.0 released for Windows, Linux, macOS and Raspberry Pi


GeeXLab logo

A new version of GeeXLab is ready for your pixel hacks. This version brings several new features like embedded Python on Windows or a new plugin based on the popular ImageMagick tool.

1 – Release Highlights

1.1 ImageMagick Plugin

ImageMagick can be seen as the swiss-knife of image tools. ImageMagick is essentially a command line tool and like ffmpeg, it offers a zillion functions to manipulate images:

Use ImageMagick to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.


ImageMagick logo

The nice thing is that a SDK is also available so any developer can add ImageMagick features on its application. For GeeXLab, that means a new plugin plugin_gxc_imagemagick available for all platforms (Windows, Linux, macOS and Raspberry Pi). And a new plugin means a new library for Lua and Python: gh_imagemagick.

ImageMagick supports many image formats in reading and in writing. Then you can use ImageMagick plugin to load textures instead using gh_texture.create_from_file(…):

local PF_U8_RGB = 1
local PF_U8_RGBA = 3
local pixel_format = PF_U8_RGBA
local gen_mipmaps = 0
local free_cpu_memory = 0
local upload_to_gpu = 1
tex0 = gh_imagemagick.texture_create_from_file(filename, pixel_format, gen_mipmaps, free_cpu_memory, upload_to_gpu)

Once you have a texture created with ImageMagick plugin, you can resize it, crop or apply some effects like sepia, quantize, oil paint, etc:

gh_imagemagick.texture_crop(tex0, x, y, w, h)
gh_imagemagick.texture_negate(tex0, 0)
gh_imagemagick.texture_quantize(tex0, num_colors, dither_method_type)
gh_imagemagick.texture_posterize(tex0, num_colors, dither_method_type)
gh_imagemagick.texture_swirl(tex0, degrees, interpolation_method)
gh_imagemagick.texture_emboss(tex0, radius, sigma)

A demo is available in the gl-21/imagemagick/ folder of the full code sample pack.

1.2 Python shipped with the Windows version

GeeXLab supports two programming languages: Lua and Python. Lua is embedded in the core of GeeXLab and is always available. On the other side, Python is available via a plugin (plugin_gxl_python_xxx.xxx). Python is installed by default on Linux, Raspbian and macOS. So you can immediately start Python programming with GeeXLab on these platforms. On Windows, Python is not available and you have to install it (you have to download Python 2.7 installer from python.org). So far… Now, it’s an old story. Python 2.7 is now shipped with GeeXLab and like on other platforms, you can start Python programming in no time with GeeXLab.

I shipped the latest Python 2.7.14. So by default GeeXLab will use its own Python installation (in the {GeeXLab}/python/ folder). But if you need to use your Python installation, just tell GeeXLab where to found the Python home with:

GeeXLab.exe /python_home="C:/Python27"

And do not forget to remove python.dll from the plugins/ folder.

Python scripts can be used with Lua scripts in a same demo. You are not limited to an unique language for a demo. For example if you need to quickly download an asset from the Internet, just add a Python script for that job while the rest of the demo is coded with Lua.

1.3 Native File Dialog

I added the support of NativeFileDialog in GeeXLab. Three new functions are available in the gh_utils library in Lua and Python: nfd_open_dialog(), nfd_save_dialog() and nfd_pick_folder().

These functions open a native dialog box for opening and saving a file as well as for selecting a folder. These functions work fine on Windows, Linux and Raspberry Pi (Raspbian). But these do not work on macOS. Why? Because this extremely advanced powerful operating system expects UI (user interface) functions to be called in the main thread of the application. A GeeXLab demo runs in its own system thread and calls any Lua / Python function from this thread. So calling a ndf_xxxxx() function on macOS leads to a nice crash. To make ndf functions to work on macOS I must find a solution that calls ndf functions from GeeXLab main thread and sends results to the correct thread… Maybe I’ll do it during one of the next rainy days!

Here are screenshots of nfd_open_dialog() on Linux and Raspbian:


GeeXLab native file dialog demo on Linux
GeeXLab native file dialog demo on Raspberry Pi

A demo is available in the gl-21/native_file_dialog/ folder of the full code sample pack.

 

2 – Downloads

The latest version of GeeXLab as well as code sample packs can be downloaded from THIS PAGE.

For bug-reports or feedbacks, a thread is available HERE.

 

3 – Changelog

Full changelog from beginning of time is available HERE.

Version 0.19.0.2 – 2017.11.23
—————————–
! [WINDOWS] added vcomp140.dll in the plugins/ folder for ImageMagick plugin.
! [WINDOWS] recompiled gxl_xxx.dll library.

Version 0.19.0.1 – 2017.11.22
—————————–
+ [WINDOWS X64]: added few experimental functions to gh_utils
(lua only) for alloc/set/get global arrays (types: int, float and string):
global_array_{type}_alloc(), global_array_{type}_get()
and global_array_{type}_set().

Version 0.19.0.0 – 2017.11.21
—————————–
+ added ImageMagick support via a new plugin (plugin_gxc_imagemagick)
and a new library: gh_imagemagick (lua and python).
+ added new functions to handle open and save file dialog boxes
nfd_open_dialog(), nfd_save_dialog() and
nfd_pick_folder() to gh_utils (lua / python).
+ added write_to_file_v4() to gh_texture lib (lua / python).
+ added copy_sub_texture() and create_from_sub_texture() to gh_texture lib (lua / python).
+ added new options for saving images (textures).
+ [WINDOWS] All standard Python libraries are now shipped with
GeeXLab in the python/ folder. Python version: 2.7.14.
+ [WINDOWS] added cpu_get_mem_available_size_mb() and cpu_get_mem_size_mb()
in gh_utils lib (lua, python).
! updated trace file: simplified line header, less Vulkan information.
! [WINDOWS] changed mouse cursor: default is arrow, left button is hand.
* bugfix in the display of the current slider value in
gh_imgui.slider_1i() and gh_imgui.vslider_1i().
* bugfix in the vsync management when the progress bar
is used in INIT scripts.



Leave a Comment

Your email address will not be published. Required fields are marked *