Commit 585f1c68 authored by Halla Rempt's avatar Halla Rempt

Use the new method to create a kisimage from a qimage

parent d5df3927
......@@ -57,13 +57,7 @@ KisImportExportErrorCode KisQImageIOImport::convert(KisDocument *document, QIODe
return ImportExportCodes::FileFormatIncorrect;
const KoColorSpace *colorSpace = KoColorSpaceRegistry::instance()->rgb8();
KisImageSP image = new KisImage(document->createUndoStore(), img.width(), img.height(), colorSpace, i18n("Imported Image"));
KisPaintLayerSP layer = new KisPaintLayer(image, image->nextLayerName(), 255);
layer->paintDevice()->convertFromQImage(img, 0, 0, 0);
image->addNode(, image->rootLayer().data());
KisImageSP image = KisImage::fromQImage(img, document->createUndoStore());
return ImportExportCodes::OK;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment