I’m synching my source base with the past few month’s worth of JUCE changes, including the refactored Image class. Overall I appreciate the changes to a reference-counted object. It’s making for less and better code in my app.
Unfortunately a use I am relying on has gone away and as far as I can tell is no longer possible to do with the new Image class, whether cleanly or not. I have (or had) a subclass of Image that created an Image as a wrapper around an existing bitmap. Like this:
: Image(Image::SingleChannel, sig->getWidth(), sig->getHeight())
pixelStride = 1;
lineStride = 1 << sig->getWidthBits();
imageData = (unsigned char*)sig->getBuffer();
Possibly this use is what you had planned for “const bool /makeWritable/” in Image::BitmapData::BitmapData()? That could work if it creates references to SharedImage::pixelStride etc. But I would prefer to acknowledge that some people might want to do what I’m doing, and provide a constructor or createWithBitmapData() method.
BTW, the rest of my update is going smoothly.