Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 23489 → Rev 23515

/trunk/Scribus/scribus/colormgmt/sclcms2colorprofileimpl.cpp
106,3 → 106,24
m_profileHandle = nullptr;
}
}
 
bool ScLcms2ColorProfileImpl::save(QByteArray& profileData) const
{
if (!m_profileHandle)
return false;
profileData.clear();
 
// First retrieve profile size
cmsUInt32Number bytesNeeded = 0;
bool done = cmsSaveProfileToMem(m_profileHandle, 0, &bytesNeeded);
if (!done)
return false;
 
// Allocate array for profile data
profileData.resize(bytesNeeded);
if (profileData.size() != bytesNeeded)
return false;
done = cmsSaveProfileToMem(m_profileHandle, profileData.data(), &bytesNeeded);
 
return done;
}