|
|
|
@ -139,7 +139,7 @@ void DecoderThread::run() {
|
|
|
|
|
|
|
|
|
|
CancellableBuffer buffer(mRawData, this);
|
|
|
|
|
buffer.open(IO_ReadOnly);
|
|
|
|
|
imageIO.setIODevice(TQT_TQIODEVICE(&buffer));
|
|
|
|
|
imageIO.setIODevice(&buffer);
|
|
|
|
|
bool ok=imageIO.read();
|
|
|
|
|
if (testCancel()) {
|
|
|
|
|
LOG("cancelled");
|
|
|
|
@ -275,7 +275,7 @@ public:
|
|
|
|
|
Q_ASSERT(mRawData.size()>0);
|
|
|
|
|
TQBuffer buffer(mRawData);
|
|
|
|
|
buffer.open(IO_ReadOnly);
|
|
|
|
|
mImageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer));
|
|
|
|
|
mImageFormat = TQImageIO::imageFormat(&buffer);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -460,7 +460,7 @@ void ImageLoader::slotDataReceived(TDEIO::Job* job, const TQByteArray& chunk) {
|
|
|
|
|
// Try to determine the data type
|
|
|
|
|
TQBuffer buffer(d->mRawData);
|
|
|
|
|
buffer.open(IO_ReadOnly);
|
|
|
|
|
const char* format = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer));
|
|
|
|
|
const char* format = TQImageIO::imageFormat(&buffer);
|
|
|
|
|
if (format) {
|
|
|
|
|
// This is a raster image, get the mime type now
|
|
|
|
|
d->mURLKind = MimeTypeUtils::KIND_RASTER_IMAGE;
|
|
|
|
|