Hey guys,
Sometime recently I noticed that loading images from webInputStreams stopped working for me.
Haven’t dug into it, so it may be an intentional change or something I am missing, but I noticed that this code stopped working:
ScopedPointer<InputStream> in (urlToHit.createInputStream(false, nullptr, nullptr, String::empty, 2000) );
mostRecentImage = ImageFileFormat::loadFrom ( *in.get() );
However, replacing it with a version that reads the stream into a MemoryBlock and then loads was fine:
ScopedPointer<InputStream> in (urlToHit.createInputStream(false, nullptr, nullptr, String::empty, 2000) );
MemoryBlock dest;
int size = in->readIntoMemoryBlock(dest);
mostRecentImage = ImageFileFormat::loadFrom(dest.getData(), size);
Anyway, I assume the first is intended to work as well, since the function still exists, but it definitely gets stuck trying to create the image (format->decodeImage() is returning invalid images).
I tried it with both JPEG and PNG, and with JUCE_USING_COREIMAGE_LOADER set to 1 and 0. Same result. This is on mac, if that matters.