JUCE 8 / Direct2D—assertion when calling getFromMemory()

I’ve run into a sortof-unrelated issue in Loading bulk PNGs in threads got unsafe when moved to Direct2D? , but I wanted to call out that:

juce::PNGHelpers::createImageFromData
(in your stack trace there)

creates an image with this, which will always use NativeImageType, which will hit the d2d accelerated bitmap size limit:

Image image(hasAlphaChan ? Image::ARGB : Image::RGB, width, height, hasAlphaChan);

I’m looking for a neat way to override this myself (see linked thread above for why)

Cheers