O'Reilly logo

Getting Started With JUCE by Martin Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading and writing image files

JUCE includes built-in support for reading and writing GIF, PNG, and JPEG image files. JUCE also includes its own Image class for holding bitmap images. The following example illustrates how to present a native file browser to choose an image file, load the image file, and display it in an ImageComponent object. Create a new GUI project in the Introjucer application with a basic window named Chapter04_03. and make the window resizable in the Main.cpp file, as we did in earlier chapters. You should then change the MainComponent.h file to contain:

#ifndef __MAINCOMPONENT_H__ #define __MAINCOMPONENT_H__ #include "../JuceLibraryCode/JuceHeader.h" class MainContentComponent : public Component, public Button::Listener ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required