Using Images

Hello… probably a stupid question. But, I can’t seem to figure it out.

I understand that all of the images being used in the demo are converted to binay format and are contained in the binary.cpp file.

So, in my own project… how do I convert the .jpg files I wanna use into that “auto generated” binary file. ?

hmmmmm… maybe I’m looking at this the wrong way?

Thanks in advance!

-elias

Hi
there is command line utility on the main juce page called binary builder that will genrate a binary.cpp and . h file you can include in your project.

Yeah, dunno why I didn’t grab the binary builder when I got JUCE. All working great now!

I’m sure i’ll figure it out if I tinker enough… But, how would I go about switching the image, and keeping it switched… when clicked?

for example… i’m writing an audio player. The play button is grey, but I want it to switch to another bitmap (green version of the button) untill the user hits stop, or the play button again.

Yea i’m trying to figure the exact same thing out myself with a mute buttons on each channel. i’m trying to use a Image Button but it only works like a momentary swtich. i’m trying to make it so when the button is clicked its stays on the lit image until clicked again.

i’ll let you know if i figure it out you do the same.

thanks