Welcome to %s forums

BrainModular Users Forum

Login Register

Embedding bitmap images into a patch

I need help on a Patch
Post Reply
jjbonkers
Member
Posts: 35
Contact:

Unread post by jjbonkers » 08 Apr 2015, 01:04

Hi I'm working on a patch that contains a panel image module. I wish to display different bitmap images on this panel. At the moment I'm feeding a text panel into the image input of the panel. The text panel specifies the location of the image on my computer.

However is there a better way to do this? Eg embed the image file into the patch (.pat file ) and refer to this internal file rather than some external location?

The image then gets saved with the patch file and it mean that the patch does not have any external dependencies...

Anyone know if this is possible?

Thx

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 08 Apr 2015, 03:02

Hello jjbonkers,

So when you are ready to save your patch, do an export instead of a save. This will create a folder that will contain the patch file.
Then manually add a /Images folder located in the same folder as the patch.
This will be where you want to place your images used in the patch. Although they are saved within the patch for objects, if there are referenced images or the reference is lost this is the place to put them so they are not lost.
This was just added a few releases ago to address a search that if an image is not found, it will search within this export structure for the image file.

Exporting to Share and Archive

I dont know but maybe doing a .Images for your location...but I am not sure how it will work out. I mean specifically to Platform wise for the(/) () differences.
In the script there is the general function to correct this problem.
There are still some questions and discussion going regarding the best methods of sharing and export.
The Audio files work well, and the new Images search solves the image issue if it is lost in the patch. There are still other questions in mind for other Data.
I've been thinking really hard about these references and export a lot too. If you find anything wrong with the Wiki page or have additional info...please update or let me know so I can update to help others.

-S
"Every act of creation is first an act of destruction." -Picasso

jjbonkers
Member
Posts: 35
Contact:

Unread post by jjbonkers » 08 Apr 2015, 09:31

Thanks for this info sephult, will see if this works and update the Wiki page if necessary

Gluck

JJ

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 08 Apr 2015, 13:17

Most definitely,

Test some stuff out and if you need some help let me know.

ConfigResourcesPictures
is another place you can reference in the directory of Usine. Although I think the right way to go is to reference the Export directories, this way when sharing as add-ons they are there.

-S
"Every act of creation is first an act of destruction." -Picasso

jjbonkers
Member
Posts: 35
Contact:

Unread post by jjbonkers » 19 Apr 2015, 22:32

Hi again its been some time but Ive had the time to look at this again. So now I have an image folder in the same directory as my patch and can reference images in this folder in the patch.

Next question: how do you package both patch and image files into one .pat file that I can upload to the usine website to be used by everyone? Or is there another way to do that ? Have read the wiki but don't see where this issue is addressed...

thx

JJ

jjbonkers
Member
Posts: 35
Contact:

Unread post by jjbonkers » 21 Apr 2015, 21:45

Found out why my images were not saving in the patch. Some of the images names were only been used dependent on the selection of combo boxes etc. These were not being saved. Had to explicitly attach all my images to a separate panel image modules and then make them invisible. In this way I could build up an image library that would be saved internally when I saved my patch. Wasn't exactly intuitive... Is there a better way to do this - an image library module perhaps that can build up an array of images?

Perhaps all images in the Images folder should be automatically saved within the patch when you do an export whether explicitly reference in the patch or not?

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 21 Apr 2015, 22:44

So once you are done with your export directory with the /images folder...just zip this directory up directly.
You can upload .ZIP and it will display properly once in the add-ons.

-S
"Every act of creation is first an act of destruction." -Picasso

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests