Changeset View
Changeset View
Standalone View
Standalone View
plugins/impex/libkra/kis_kra_loader.cpp
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Line(s) | 210 | if ((attr = element.attribute(MIME)) == NATIVE_MIMETYPE) { | |||
---|---|---|---|---|---|
270 | if (cs == 0) { | 270 | if (cs == 0) { | ||
271 | // try once more without the profile | 271 | // try once more without the profile | ||
272 | cs = KoColorSpaceRegistry::instance()->colorSpace(colorspaceModel, colorspaceDepth, ""); | 272 | cs = KoColorSpaceRegistry::instance()->colorSpace(colorspaceModel, colorspaceDepth, ""); | ||
273 | if (cs == 0) { | 273 | if (cs == 0) { | ||
274 | m_d->errorMessages << i18n("Image specifies an unsupported color model: %1.", colorspacename); | 274 | m_d->errorMessages << i18n("Image specifies an unsupported color model: %1.", colorspacename); | ||
275 | return KisImageSP(0); | 275 | return KisImageSP(0); | ||
276 | } | 276 | } | ||
277 | } | 277 | } | ||
278 | KisProofingConfigurationSP proofingConfig = KisImageConfig(true).defaultProofingconfiguration(); | 278 | KisProofingConfigurationSP proofingConfig = KisImageConfig().defaultProofingconfiguration(); | ||
279 | if (!(attr = element.attribute(PROOFINGPROFILENAME)).isNull()) { | 279 | if (!(attr = element.attribute(PROOFINGPROFILENAME)).isNull()) { | ||
280 | proofingConfig->proofingProfile = attr; | 280 | proofingConfig->proofingProfile = attr; | ||
281 | } | 281 | } | ||
282 | if (!(attr = element.attribute(PROOFINGMODEL)).isNull()) { | 282 | if (!(attr = element.attribute(PROOFINGMODEL)).isNull()) { | ||
283 | proofingConfig->proofingModel = attr; | 283 | proofingConfig->proofingModel = attr; | ||
284 | } | 284 | } | ||
285 | if (!(attr = element.attribute(PROOFINGDEPTH)).isNull()) { | 285 | if (!(attr = element.attribute(PROOFINGDEPTH)).isNull()) { | ||
286 | proofingConfig->proofingDepth = attr; | 286 | proofingConfig->proofingDepth = attr; | ||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 393 | if (store->hasFile(location)) { | |||
394 | if (store->open(location)) { | 394 | if (store->open(location)) { | ||
395 | QByteArray proofingData; | 395 | QByteArray proofingData; | ||
396 | proofingData.resize(store->size()); | 396 | proofingData.resize(store->size()); | ||
397 | bool proofingProfileRes = (store->read(proofingData.data(), store->size())>-1); | 397 | bool proofingProfileRes = (store->read(proofingData.data(), store->size())>-1); | ||
398 | store->close(); | 398 | store->close(); | ||
399 | 399 | | |||
400 | KisProofingConfigurationSP proofingConfig = image->proofingConfiguration(); | 400 | KisProofingConfigurationSP proofingConfig = image->proofingConfiguration(); | ||
401 | if (!proofingConfig) { | 401 | if (!proofingConfig) { | ||
402 | proofingConfig = KisImageConfig(true).defaultProofingconfiguration(); | 402 | proofingConfig = KisImageConfig().defaultProofingconfiguration(); | ||
403 | } | 403 | } | ||
404 | 404 | | |||
405 | if (proofingProfileRes) { | 405 | if (proofingProfileRes) { | ||
406 | const KoColorProfile *proofingProfile = KoColorSpaceRegistry::instance()->createColorProfile(proofingConfig->proofingModel, proofingConfig->proofingDepth, proofingData); | 406 | const KoColorProfile *proofingProfile = KoColorSpaceRegistry::instance()->createColorProfile(proofingConfig->proofingModel, proofingConfig->proofingDepth, proofingData); | ||
407 | if (proofingProfile->valid()){ | 407 | if (proofingProfile->valid()){ | ||
408 | KoColorSpaceRegistry::instance()->addProfile(proofingProfile); | 408 | KoColorSpaceRegistry::instance()->addProfile(proofingProfile); | ||
409 | } | 409 | } | ||
410 | } | 410 | } | ||
▲ Show 20 Lines • Show All 800 Lines • Show Last 20 Lines |