3
* Copyright (c) 2007 Cyrille Berger (cberger@cberger.net)
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#include "xyz_u16_plugin.h"
22
#include <kgenericfactory.h>
23
#include <KoColorSpaceRegistry.h>
24
#include <KoBasicHistogramProducers.h>
26
#include "kis_xyz_u16_colorspace.h"
28
typedef KGenericFactory<XYZU16Plugin> XYZU16PluginFactory;
29
K_EXPORT_COMPONENT_FACTORY(krita_xyz_u16_plugin, XYZU16PluginFactory("krita"))
32
XYZU16Plugin::XYZU16Plugin(QObject *parent, const QStringList &)
36
KoColorSpaceRegistry * f = KoColorSpaceRegistry::instance();
38
KoColorProfile *xyzProfile = KoLcmsColorProfileContainer::createFromLcmsProfile(cmsCreateXYZProfile());
39
f->addProfile(xyzProfile);
42
KoColorSpaceFactory * csf = new KisXyzU16ColorSpaceFactory();
45
KoHistogramProducerFactoryRegistry::instance()->add(
46
new KoBasicHistogramProducerFactory<KoBasicU16HistogramProducer>
47
(KoID("XYZ16HISTO", i18n("XYZ16 Histogram")), csf->id()));
51
XYZU16Plugin::~XYZU16Plugin()
55
#include "xyz_u16_plugin.moc"