Changeset View
Changeset View
Standalone View
Standalone View
krita/ui/kis_png_converter.cpp
Show First 20 Lines • Show All 584 Lines • ▼ Show 20 Line(s) | 511 | #endif | |||
---|---|---|---|---|---|
585 | if (cs == 0) { | 585 | if (cs == 0) { | ||
586 | png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); | 586 | png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); | ||
587 | return KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE; | 587 | return KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE; | ||
588 | } | 588 | } | ||
589 | //TODO: two fixes : one tell the user about the problem and ask for a solution, and two once the kocolorspace include KoColorTransformation, use that instead of hacking a lcms transformation | 589 | //TODO: two fixes : one tell the user about the problem and ask for a solution, and two once the kocolorspace include KoColorTransformation, use that instead of hacking a lcms transformation | ||
590 | // Create the cmsTransform if needed | 590 | // Create the cmsTransform if needed | ||
591 | KoColorTransformation* transform = 0; | 591 | KoColorTransformation* transform = 0; | ||
592 | if (profile && !profile->isSuitableForOutput()) { | 592 | if (profile && !profile->isSuitableForOutput()) { | ||
593 | transform = KoColorSpaceRegistry::instance()->colorSpace(csName.first, csName.second, profile)->createColorConverter(cs, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags); | 593 | transform = KoColorSpaceRegistry::instance()->colorSpace(csName.first, csName.second, profile)->createColorConverter(cs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags()); | ||
594 | } | 594 | } | ||
595 | 595 | | |||
596 | // Creating the KisImageWSP | 596 | // Creating the KisImageWSP | ||
597 | if (m_image == 0) { | 597 | if (m_image == 0) { | ||
598 | m_image = new KisImage(m_doc->createUndoStore(), width, height, cs, "built image"); | 598 | m_image = new KisImage(m_doc->createUndoStore(), width, height, cs, "built image"); | ||
599 | Q_CHECK_PTR(m_image); | 599 | Q_CHECK_PTR(m_image); | ||
600 | } | 600 | } | ||
601 | 601 | | |||
▲ Show 20 Lines • Show All 635 Lines • Show Last 20 Lines |