Reply To: How to display external images within Ctrlr?

Home Forums General Panels, Components, Macros How to display external images within Ctrlr? Reply To: How to display external images within Ctrlr?

#83189
dasfaker
Keymaster
  • Topics: 80
  • Replies: 793
  • Total: 873
  • ★★★

In this post Atom says what LUA classes are bound to LUA (so they work in Ctrlr). He says that you need a pair of files (.h/.cpp) in order to bound a class. The link provided is from an old Ctrlr version, so we can compare between what was there years ago and what we have today:

Old Ctrlr: https://sourceforge.net/p/ctrlrv4/code/1511/tree/nightly/Source/Lua/JuceClasses/

Actual Ctrlr: https://github.com/RomanKubiak/ctrlr/tree/master/Source/Lua/JuceClasses

In the old Ctrlr there is “LImage.cpp” file that is not present now.

You can try in Ctrlr 5.3.201, in the console, the following:

img = Image()
what(img)

and you get this:

Object type [Image]
-----------------------------------------------------------------

Members:
	              moveImageSection:	function
	             multiplyAllAlphas:	function
	                         isRGB:	function
	               hasAlphaChannel:	function
	                        isNull:	function
	                    setPixelAt:	function
	                      getWidth:	function
	             duplicateIfShared:	function
	                       isValid:	function
	                        isARGB:	function
	               isSingleChannel:	function
	                    getPixelAt:	function
	                     getHeight:	function
	                      rescaled:	function
	                        __init:	function
	               multiplyAlphaAt:	function
	             getReferenceCount:	function
	                    desaturate:	function

The one you are looking for seems to be class ImageFileFormat(), but I haven’t been able to make it work.

Ctrlr