Commit a35a747e authored by Emanuele Tamponi's avatar Emanuele Tamponi

The Painterly Framework is here!

It has the same old Painterly Mixer, and a shiny new
Bidi Paint Operation. The Mixer Tool is now based on
KisToolFreehand, so it's a lot smoother.
Enjoy the bugs! :-)

svn path=/trunk/koffice/; revision=702433
parent af1ee29e
......@@ -3,4 +3,10 @@ add_subdirectory( paintops )
add_subdirectory( tools )
add_subdirectory( viewplugins )
find_package(GLPK)
if(GLPK_FOUND)
add_subdirectory( painterlyframework )
else(GLPK_FOUND)
message(STATUS "Could not find the GLPK library. The painterly mixer plugin will not be built.")
endif(GLPK_FOUND)
add_subdirectory(tests)
#################################################
# Painterly Common Libraries
set(kritapainterlycommon_PART_SRCS
kis_illuminant_profile.cpp
kis_ks_colorspace.cpp
kis_rgbks_colorspace.cpp
mathematics.cpp
)
kde4_add_library(kritapainterlycommon SHARED ${kritapainterlycommon_PART_SRCS})
target_link_libraries(kritapainterlycommon kritaimage glpk)
install(TARGETS kritapainterlycommon DESTINATION ${LIB_INSTALL_DIR})
#################################################
# Painterly Mixer
set(kritapainterlymixer_PART_SRCS
colorspot.cpp
mixercanvas.cpp
mixertool.cpp
kis_painterlymixer.cpp
kis_painterlymixerdocker.cpp
painterlymixer.cpp
)
kde4_add_ui_files(kritapainterlymixer_PART_SRCS kis_painterlymixer.ui)
kde4_add_plugin(kritapainterlymixer ${kritapainterlymixer_PART_SRCS})
target_link_libraries(kritapainterlymixer kritapainterlycommon kritaui)
install(TARGETS kritapainterlymixer DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kritapainterlymixer.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES IlluminantD50.ill IlluminantD65.ill IlluminantD75.ill DESTINATION ${DATA_INSTALL_DIR}/krita/profiles)
#################################################
# Painterly Complex Paintop
set(kritacomplexbrush_PART_SRCS
complexbrush.cpp
kis_complexop.cpp
)
kde4_add_plugin(kritacomplexbrush ${kritacomplexbrush_PART_SRCS})
target_link_libraries(kritacomplexbrush kritapainterlycommon)
install(TARGETS kritacomplexbrush DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kritacomplexbrush.desktop DESTINATION ${SERVICES_INSTALL_DIR})
CIE Standard D50-Illuminant
1.873256666804076421887858107731550383334706566529348492622375488e-07
2.025650114148112631299236338633384946206206222996115684509277344e-06
8.64943588731222819132073154069217935102642513811588287353515625e-06
0.0002159021779721042515014228779790528278681449592113494873046875
0.006093631248257034248305696877423542900942265987396240234375
2.72351067771602601652429498368945814945618622004985809326171875e-05
0.040260089222902036010243165264910203404724597930908203125
0.06659418872946036571658368075077305547893047332763671875
0.00051829373176144285552402468653099276707507669925689697265625
0.0220520308208083555545631071481693652458488941192626953125
0.007693943617282843726312702159475520602427423000335693359375
0.0311548523882493599845844300944008864462375640869140625
0.064728152943642036643012716012890450656414031982421875
0.18343973480953479349153667499194853007793426513671875
0.22791388394337752654195128343417309224605560302734375
0.30955669100245675195992589578963816165924072265625
6.764674229319452611738162960478004670505924877943471074104309082e-08
7.31499360022064268652651486402049840762629173696041107177734375e-07
2.595576085959916861035598218548914317693743214476853609085083008e-07
6.160513098669939964610771376829490009185974486172199249267578125e-06
0.00016940460532312434107325704868429738780832849442958831787109375
9.835090755070303414580971945735399231125484220683574676513671875e-06
0.001793531638079466118684823783269166597165167331695556640625
0.010029874675287410445978508732878253795206546783447265625
0.000187165391430660983836109512168377477792091667652130126953125
0.04810945909468218595339550347489421255886554718017578125
0.002783401997224523027885112469448358751833438873291015625
0.264531477185447061462042483981349505484104156494140625
0.0241509706456387307493827165671973489224910736083984375
0.32631770774615720398514895350672304630279541015625
0.098943345238482027781401484389789402484893798828125
0.2229666074746828596797598720513633452355861663818359375
9.999999999999999653057388335469287129029766072807834803722132479e-65
9.999999999999999653057388335469287129029766072807834803722132479e-65
4.0470863307285993783375677157465588607010431587696075439453125e-05
0.0010189546286574250287537690695671699359081685543060302734375
0.0290645176920133196940554398679523728787899017333984375
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.1973814795535739075038605960799031890928745269775390625
0.364439675441016130985616428006323985755443572998046875
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.2121370769373562004123101587538258172571659088134765625
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.0224158950397136645660278730929348967038094997406005859375
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.001482071479154470176886615462308327550999820232391357421875
3.90175244350084298740853616660473335286951623857021331787109375e-05
0.0003199803936211173993782452829037765695829875767230987548828125
0.97943549437073074148685236650635488331317901611328125 -0.00871939731187626639041798881635259022004902362823486328125 0.0004144320132944300156575823113058731905766762793064117431640625
-0.006003262513619804334463747608197081717662513256072998046875 0.99670981429174398957826497280620969831943511962890625 -0.0003757084473840569265219724304216697419178672134876251220703125
0.004655480416075448435453409956608084030449390411376953125 0.00190103628754374233411628125622883089818060398101806640625 1.005720830391050757413040628307498991489410400390625
1.021052835069466535600213319412432610988616943359375 0.0089330532863193153059189199893808108754456043243408203125 -0.000418262126883122580846274818355823299498297274112701416015625
0.00614898515536969371420017438367722206749022006988525390625 1.00335307805607687470228484016843140125274658203125 0.0003726783472098087949923861383894063692423515021800994873046875
-0.004737366780431900327441585574206328601576387882232666015625 -0.00193831290223962608709751265223530936054885387420654296875 0.99431368478120829568212002413929440081119537353515625
CIE Standard D65-Illuminant
1.539626183882830836657047614973725657705472258385270833969116211e-07
1.704687480361050616964064402525380614861205685883760452270507812e-06
1.532291887345848583842390644438324898146674968302249908447265625e-05
0.00030917539063985734204553779136404045857489109039306640625
0.0079059344934224971834790807179160765372216701507568359375
2.349878294746169339808107567879602584071108140051364898681640625e-05
0.053114354952792208752754277156782336533069610595703125
0.0881393460115448001968019298146828077733516693115234375
0.00045248602894411489062920228576558656641282141208648681640625
0.03311330872944033554272635910820099525153636932373046875
0.006846571234242084143251094729976102826185524463653564453125
0.024037000845296148388019474850807455368340015411376953125
0.059140395471932068194309550790421781130135059356689453125
0.1696287393802213550042523593219812028110027313232421875
0.2116525752304407037573952266029664315283298492431640625
0.28897442108303794672252706732251681387424468994140625
5.559873216235001854679148342204542121436361412634141743183135986e-08
6.155938738937402389405934705068901280355930794030427932739257812e-07
4.598196034193811395772866906783704621375363785773515701293945312e-07
8.849385063037060289675532487319031815786729566752910614013671875e-06
0.000219880119179428575905410614410584457800723612308502197265625
8.48583809565227290970697293648328241033595986664295196533203125e-06
0.0021702237317801679160333971907448358251713216304779052734375
0.01180981324925986335194760812328240717761218547821044921875
0.00016340100293362128515244069415501826370018534362316131591796875
0.048132707858289373870075422701120260171592235565185546875
0.002477543718606134252879780177636348525993525981903076171875
0.2697371676965427678140940770390443503856658935546875
0.0221598616510453039207817482747486792504787445068359375
0.33127371595127386161294680277933366596698760986328125
0.09350260501924811951113269969937391579151153564453125
0.21833461376647311791288075255579315125942230224609375
9.999999999999999653057388335469287129029766072807834803722132479e-65
9.999999999999999653057388335469287129029766072807834803722132479e-65
7.16962080852042858876427278147502875071950256824493408203125e-05
0.00145876443626859956907704241046985771390609443187713623046875
0.0376626603211955568450974851657520048320293426513671875
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.259229482996086224577680923175648786127567291259765625
0.47463322656727802151266359942383132874965667724609375
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.28146662110967579639719815531861968338489532470703125
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.029728071373074364813771097715289215557277202606201171875
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.0019048235354461088252031597534141837968491017818450927734375
4.41544725852648710742211213275965064894990064203739166259765625e-05
0.000325496413873256509700915284355460244114510715007781982421875
0.94942797921235888569668759373598732054233551025390625 -0.01709108426215509568546480068107484839856624603271484375 0.01488372692069080301113803699308846262283623218536376953125
-0.0163421294755485557725904754988732747733592987060546875 0.98112716555353662872818176765576936304569244384765625 -0.02548551270564934634332843188531114719808101654052734375
0.07087109823887059734115467790616094134747982025146484375 0.022791161746257997122722116500881384126842021942138671875 1.3723143831920097124310586877982132136821746826171875
1.0544140212744392837151963249198161065578460693359375 0.0186252501177371874996335776586420251987874507904052734375 -0.01109073130599790187045261546927577001042664051055908203125
0.016142296421393594052506870184515719301998615264892578125 1.0190804219017304266259316136711277067661285400390625 0.018750819184884359724918567735585384070873260498046875
-0.05472109513461255458910414972706348635256290435791015625 -0.017886948601081663345890859773135161958634853363037109375 0.72895787590817295864553670980967581272125244140625
CIE Standard D75-Illuminant
1.417006807593571326724828703808034546796079666819423437118530273e-07
1.587299319360858267292544929172315448795416159555315971374511719e-06
1.964837457487177317595923586868167376451310701668262481689453125e-05
0.000358157368198282091524553560901722448761574923992156982421875
0.0087976521827655106144927543709854944609105587005615234375
2.209996750096700627902408797798017303648521192371845245361328125e-05
0.059746091534363561514897611459673498757183551788330078125
0.099348310582720034123127561542787589132785797119140625
0.0004275107375008812518775436206652784676407463848590850830078125
0.03864978585773533314995376031220075674355030059814453125
0.006538597673447843657001943284967637737281620502471923828125
0.0218104965295131299207742614498783950693905353546142578125
0.05704632497828983350718345946006593294441699981689453125
0.1644579706496144544392024045009748078882694244384765625
0.20482645778261676650089384565944783389568328857421875
0.279658799397204338443856386220431886613368988037109375
5.117072104407471998541244006392103571556617680471390485763549805e-08
5.732028587593618231603941580443173364756148657761514186859130859e-07
5.896205468073326490233599002366293717614098568446934223175048828e-07
1.026084285163587333914760046926772929509752430021762847900390625e-05
0.0002443852861236231791518258571471733375801704823970794677734375
7.98070590174002029320611539819907420678646303713321685791015625e-06
0.0023441482419819764486390578639429804752580821514129638671875
0.01257291966491158423380181119455301086418330669403076171875
0.00015438196718591670818059025105384307607891969382762908935546875
0.04945374875347617604770533716873615048825740814208984375
0.0023668864868213435569133107350126010715030133724212646484375
0.2720836757665192617849925227346830070018768310546875
0.0214244990467679329027017587350201210938394069671630859375
0.3315041820617541379334625162300653755664825439453125
0.0913323068036838436878355196313350461423397064208984375
0.2164994103778941081372977350838482379913330078125
9.999999999999999653057388335469287129029766072807834803722132479e-65
9.999999999999999653057388335469287129029766072807834803722132479e-65
9.1935091720425450773947206872804827071377076208591461181640625e-05
0.00168952848559565508602953176620076192193664610385894775390625
0.041884697607465097568546497086572344414889812469482421875
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.29101295093576506900490130647085607051849365234375
0.5310074849830244136938972587813623249530792236328125
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.31743834254192215826861911409650929272174835205078125
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.033021916634797310319271446132916025817394256591796875
9.999999999999999653057388335469287129029766072807834803722132479e-65
0.002070035542724777029299776387460951809771358966827392578125
4.5546294731495882827411458837474356187158264219760894775390625e-05
0.000333953483273462053103342039861445300630293786525726318359375
0.9723837462164215406090761462110094726085662841796875 -0.005020384263321893934806094961231792694889008998870849609375 0.02186755239250427751418470734279253520071506500244140625
-0.01048804386237029047379554214103336562402546405792236328125 0.9790076887500360758309625452966429293155670166015625 -0.038258824189108593671893032706066151149570941925048828125
0.09759323471448026754426763318406301550567150115966796875 0.03039963983810374525962316738514346070587635040283203125 1.558358265981446333370286083663813769817352294921875
1.02989852262162884244389715604484081268310546875 0.0057256578710824894418163211184946703724563121795654296875 -0.01431211948744242658249081756594023318029940128326416015625
0.00850711258257010223549077210236646351404488086700439453125 1.0207105670653990880936134999501518905162811279296875 0.0249401584862745349935320149370454601012170314788818359375
-0.06466347212523708420928159057439188472926616668701171875 -0.020270415527192948978996156483844970352947711944580078125 0.6421112045768069265250233002007007598876953125
o MIXER
+ Remove *all* std::vector
+ Check if I do coth and acoth correctly!
+ Do not redraw the whole canvas!
+ Find something about Gaussian quadrature
+ Implement KisIlluminantProfile using Gaussian quadrature upon 470 wavelenghs (use 15 wavelenghts)
- Implement KisReflectanceColorSpace (16 channels, 15 for colors + 1 for opacity)
+ Implement KisKSColorSpace (31 channels, 30 for colors (2 per wavelenght) + 1 for opacity)
- Implement configuration option widget for the mixer
- Implement loading/saving of configuration
o PAINT OPERATION
- Find something about the physical system involved.
- Look at some tutorials (Bart's one, probably...)
- Find a good way to implement bristles.
- Correct the Mixer so that it can handle such paintop.
- Probably more to come in these days.
o PHYSICS FILTER
- Find something about physical operation involved.
- Find a way to put this in the infrastructure of Krita
- Can it be used with non-painterly color spaces?
- Can it be used without painterly overlays?
- Find a good way to implement undo's.
o MORE TO COME
- Ask if I can add my color spaces to the color space registry.
- More reflectance curves and illuminant profiles.
- TEST TEST TEST!
/*
* Copyright (c) 2007 Emanuele Tamponi <emanuele@valinor.it>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <QColor>
#include <QToolButton>
#include "KoColor.h"
#include "KoColorSpace.h"
#include "colorspot.h"
ColorSpot::ColorSpot(QWidget *parent, const KoColor &color) : QToolButton(parent)
{
m_color = color;
setPalette(QPalette(color.toQColor().rgba(), color.toQColor().rgba()));
setAutoFillBackground(true);
setAutoRepeat(true);
}
ColorSpot::~ColorSpot()
{
}
void ColorSpot::setColor(const KoColor &color)
{
m_color = color;
}
#include "colorspot.moc"
/*
* Copyright (c) 2007 Emanuele Tamponi <emanuele@valinor.it>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef COLORSPOT_H_
#define COLORSPOT_H_
#include <QToolButton>
class KoColor;
class QColor;
class ColorSpot : public QToolButton {
Q_OBJECT
public:
ColorSpot (QWidget *parent, const KoColor &color);
~ColorSpot();
void setColor(const KoColor &color);
KoColor color() const { return m_color; }
private:
KoColor m_color;
};
#endif // COLORSPOT_H_
/*
* Copyright (c) 2007 Emanuele Tamponi (emanuele@valinor.it)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <klocale.h>
#include <kiconloader.h>
#include <kcomponentdata.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include "kis_paintop_registry.h"
#include "kis_complexop.h"
#include "complexbrush.h"
typedef KGenericFactory<ComplexBrush> ComplexBrushFactory;
K_EXPORT_COMPONENT_FACTORY(kritacomplexbrush, ComplexBrushFactory("kritacore"))
ComplexBrush::ComplexBrush(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
{
setComponentData(ComplexBrushFactory::componentData());
KisPaintOpRegistry *r = KisPaintOpRegistry::instance();
r->add(KisPaintOpFactorySP(new KisComplexOpFactory));
}
ComplexBrush::~ComplexBrush()
{
}
#include "complexbrush.moc"
/*
* Copyright (c) 2007 Emanuele Tamponi (emanuele@valinor.it)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef COMPLEX_BRUSH_H
#define COMPLEX_BRUSH_H
#include <kparts/plugin.h>
class ComplexBrush : public KParts::Plugin
{
Q_OBJECT
public:
ComplexBrush(QObject *parent, const QStringList &);
virtual ~ComplexBrush();
};
#endif // COMPLEX_BRUSH_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 2007 Emanuele Tamponi <emanuele@valinor.it>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ADAPTATION_MATRICES_H_
#define ADAPTATION_MATRICES_H_
namespace AM {
const double XYZ[3][3] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
{ 0.0, 0.0, 1.0 }
};
const double XYZ_1[3][3] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
{ 0.0, 0.0, 1.0 }
};
const double Bradford[3][3] = {
{ 0.8951, -0.7502, 0.0389 },
{ 0.2664, 1.7135, -0.0685 },
{-0.1614, 0.0367, 1.0296 }
};
const double Bradford_1[3][3] = {
{ 0.986993, 0.432305, -0.008529 },
{-0.147054, 0.518360, 0.040043 },
{ 0.159963, 0.049291, 0.968487 }
};
const double VonKries[3][3] = {
{ 0.40024, -0.22630, 0.00000 },
{ 0.70760, 1.16532, 0.00000 },
{-0.08081, 0.04570, 0.91822 }
};
const double VonKries_1[3][3] = {
{ 1.859936, 0.361191, 0.000000 },
{-1.129382, 0.638812, 0.000000 },
{ 0.219897,-0.000006, 1.089064 }
};
};
#endif // ADAPTATION_MATRICES_H_
g++ -o isg isg.cpp
g++ -o ipg ipg.cpp -lm -lgmp -lgmpxx -I/home/emanuele/devel/inst/kde/include
This diff is collapsed.
/*
* Copyright (c) 2007 Emanuele Tamponi <emanuele@valinor.it>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <fstream>
#include <iostream>
#include "sn_distributions.h"
using namespace std;
int main (int argc, char *argv[])
{
if (argc != 3) {
usage:
cout << "Usage: " << argv[0] << " temperature output_file" << endl;
return 255;
}
double T = atof(argv[1]);
if (T <= 0.0)
goto usage;
double x_d, y_d;
x_d = ( -4.6070e9 / (T*T*T) ) + ( 2.9678e6 / (T*T) ) + ( 0.09911e3 / T ) + 0.244063;
y_d = -3.0*x_d*x_d + 2.870*x_d - 0.275;
double M, M1, M2;
M = 0.0241 + 0.2562*x_d - 0.7341*y_d;
M1 = (-1.3515 - 1.7703*x_d + 5.9114*y_d) / M;
M2 = ( 0.0300 - 31.4424*x_d + 30.0717*y_d) / M;
double S[471];
ofstream f(argv[2]);
f.precision(64);
for (int i = 0; i <= 470; i++) {
S[i] = sn::s0[i] + M1*sn::s1[i] + M2*sn::s2[i];
f << S[i] << endl;
}
return 0;
}
./isg 5000 IlluminantD50.raw && \
./isg 6500 IlluminantD65.raw && \
./isg 7500 IlluminantD75.raw && \
echo Y | ./ipg IlluminantD50.raw Bradford "CIE Standard D50-Illuminant" ../IlluminantD50.ill && \
echo Y | ./ipg IlluminantD65.raw Bradford "CIE Standard D65-Illuminant" ../IlluminantD65.ill && \
echo Y | ./ipg IlluminantD75.raw Bradford "CIE Standard D75-Illuminant" ../IlluminantD75.ill
This diff is collapsed.
/*
* Copyright (c) 2007 Emanuele Tamponi <emanuele@valinor.it>
* Copyright (c) 2007 Paolo Capriotti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PRECOMPUTED_D50_H_
#define PRECOMPUTED_D50_H_
namespace precom {
const double wD50[3] = {
0.964172363281250,
1.000000000000000,
0.824859619140625
};
};
#endif // PRECOMPUTED_D50_H_
This diff is collapsed.
/*
* Copyright (c) 2007 Emanuele Tamponi (emanuele@valinor.it)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <QVector>
#include <kdebug.h>
#include "kis_brush.h"
#include "kis_complex_color.h"
#include "kis_global.h"
#include "kis_paint_device.h"
#include "kis_painterly_overlay.h"
#include "kis_painterly_overlay_colorspace.h"
#include "kis_layer.h"
#include "kis_painter.h"
#include "kis_types.h"
#include "kis_paintop.h"
#include "kis_iterator.h"
#include "kis_iterators_pixel.h"
#include "kis_selection.h"
#include "mathematics.h"
#include "kis_complexop.h"
KisComplexOp::KisComplexOp(KisPainter * painter)
: super(painter)
{
}
KisComplexOp::~KisComplexOp()
{
}
void KisComplexOp::paintAt(const KisPaintInformation& info)
{
if (!painter()->brush())
return;
if (!painter()->sourceLayer())
return;
KisPaintLayerSP layer = dynamic_cast<KisPaintLayer *>(painter()->sourceLayer());
if (!layer)
return;
if (!layer->painterlyOverlay())
layer->createPainterlyOverlay();
KoColorSpace *cs = layer->paintDevice()->colorSpace();
KisPaintLayerSP buffer = new KisPaintLayer(0, "Temporary Buffer", 255, cs);
buffer->createPainterlyOverlay();
float pressure = maths::sigmoid(info.pressure);
{