I am trying to read and display an image and I can’t understand why this is not working. So this is what I am doing.
- I have a png file of a knob saved on my desktop.
- I created an assets folder in the introjucer and saved the png file there too.
In my PluginEditor.h
Then in the PluginEditor.cpp, I have this in the constructor
knob = ImageFileFormat::loadFrom(File::File("…/…/…/…/Desktop/Knob.png"));
And in the resized function I have
imageComponent.setBounds(10, 10, 50, 50);
So, I ran it a bunch of times and nothing shows up. And setting breakpoints to check if knob loaded correctly, it is null. Can you guys help me? I am stuck. Why is the knob null?
Thanks in advance!