File format and raw data from Image



I’m quite new to c++ and even more so to JUCE, so please forgive me if this is a silly question or the answer is obvious
(It’s also 3am so that’s probably not helping the thinking process)

But I have a reference to a JUCE Image and I’m trying to read the bitmapdata from it as well as the file format (this is for use with taglib to save pictures to tags)

The problem I’m having is the syntax for accessing albumCover::BitmapData::data and then also loading the reference into an ImageFileFormat so i can call getFormatName

This has stumped me for hours so any help would be appreciated



An Image doesn’t contain any reference to its original format, it’s just a bunch of pixels. (It may not even have been loaded from a file, of course).

Haven’t time to explain c++ syntax to you, but search the codebase for Image::BitmapData and there should be lots of examples of its use.