Welcome to %s forums

BrainModular Users Forum

Login Register

sdk load bitmap file

Tell us what you'd like Usine to do
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 22 Oct 2017, 21:06

could be nice to be able to load a bitmap file from disk (maybe just a single most generic handy format like png or bmp)
ideally within a module internal via sdk.

one application i personally would love to test would be for ex converting greyscale images to wavtables (an X slice of pixels luma being samples amplitudes array, Y slices being wavtable number), or internally display background images for knobs and stuff, but think there could be many applications.

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 29 Oct 2017, 09:50

I'm not sure to clearly understand.

In the next SDK 7.01.003 I'll add a new ParamType : ptFileName which create an input for file names in the user module.

Also another field in ParamInfo:

Code: Select all

	
AnsiCharPtr       FileNameFilter;       ///< optional&#58; filter used to open file when ParamType = ptFileName
	                                                ///< ie&#58; "All files &#40;*.*&#41;|*.*" or "'All Images |*.png; *.jpg; *.jpeg; *.bmp; *.tiff; *.gif"
The main pb is not to open a bitmap, it's to manipulate this bitmap... It's a long job to include bitmap manipulation procedure in the SDK.
I suggest you to take a look to video modules examples in the SDK. Frames are matrix of pixels which are easy to use in the SDK.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 29 Oct 2017, 16:01

ah yes thatparamtype would be nice add, we can already open file with the sdkopendialog i use, but if not a pain ill take that too^^

In fact i didn't know it was actually possible to load a lets say jpg file and convert/load it as frame/array of pixel within the code, but if so thats perfect for me,
ill have a look at video modules i reckon i had not digged in yet sorry, thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests