diff --git a/.gitignore b/.gitignore index faf37ce..613337a 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ nosetests.xml /tests/unittest_fotobook_mcf-Dateien/identifier.xml /tests/testMcfxExtraction/tmp-dir /requirements-all.txt +/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx.pdf diff --git a/cewe2pdf.py b/cewe2pdf.py index 39f2024..0caf532 100755 --- a/cewe2pdf.py +++ b/cewe2pdf.py @@ -488,6 +488,7 @@ def processAreaImageTag(imageTag, area, areaHeight, areaRot, areaWidth, imagedir logging.debug(f"image: {imageTag.get('filename')}") pdf.translate(img_transx, transy) # we need to go to the center for correct rotation pdf.rotate(-areaRot) # rotation around center of area + # calculate the non-symmetric shift of the center, given the left pos and the width. frameShiftX_mcf = -(frameDeltaX_mcfunit-((areaWidth - imgCropWidth_mcfunit) - frameDeltaX_mcfunit))/2 frameShiftY_mcf = (frameDeltaY_mcfunit-((areaHeight - imgCropHeight_mcfunit) - frameDeltaY_mcfunit))/2 diff --git a/cewe2pdf.pyproj b/cewe2pdf.pyproj index 3e9da53..db4fefc 100644 --- a/cewe2pdf.pyproj +++ b/cewe2pdf.pyproj @@ -5,7 +5,7 @@ 2.0 {261b8fb1-634c-480e-b162-8b5b56d18330} - runAllTests.py + tests\testClipartColorReplacement\test_clipartColorReplacement.py . . @@ -65,6 +65,17 @@ + + + + + + + + + + + @@ -99,6 +110,7 @@ + @@ -129,6 +141,8 @@ + + diff --git a/tests/Resources/photofun/backgrounds/6044.jpg b/tests/Resources/photofun/backgrounds/6044.jpg new file mode 100644 index 0000000..0ceef14 Binary files /dev/null and b/tests/Resources/photofun/backgrounds/6044.jpg differ diff --git a/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-clip.clp b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-clip.clp new file mode 100644 index 0000000..ef0349f --- /dev/null +++ b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-clip.clp @@ -0,0 +1 @@ +a3c3f786d6sc20766zg57273696f6e3dx22gw312e302r220656e636f6469n6xe673d2255544o62do3822207374616we64616jc6f6e653d226e6f223pf3e0ar3c212dk2d2043w7265617465l6420776974682049k6e6b73636170652i0286874747g03as2fu2of7777y772e69h6e6b7363617065w2e6f7267x2f29202d2d3e0a3c7o37667j20786d6c6e733aw64633d22687474703a2mf2f7075726c2ke6f72672f64u632f656c656d656ei74732f3t12e312f2g2207l86d6c6em733a63633d22687474m703a2f2f6372656174v6i97665636f6d6d6f6e73t2e6qf72672f6e732322207x86d6c6e733a7264663gd226n87474703a2f2f77777ip72e77332e6f7267p2f313939392f30322fos32322d72w64662d73796e746g1782d6e7323222h0786d6c6e733a7376k673dhw22687474703ai2f2f7777772e77332ey6f72672f323030302f7j3766722207q8y6di6c6e733d226n8747j4703a2f2f7777772e77w33n2e6f72672fq32y3030302f73766722z20786dt6c6e7l33a786c696eo6gb3d22687t474703a2f2f77777z72e77332e6f7267l2f3139393s92f786c696e6b22i20786d6c6e733a736fv646m970y6f64l693d226874v74703a2sf2f736f646l97o06f64692e73o6f75726365666f7s267652e6e65p74o2f4454442f736f64697r06f64692qd302e6q474642220786d6c6e7g33a696nve6b73636170653d226m87474703a2f2f77777p72e696e6b73o63617y0652e6fp72672f6e61j6d65737061636573n2f696e6br7363617065222076657y273696f6es3d2n2312e31222077r6964746v83d223230342e333s6363j43622206v865696768743d22323v1342e3432x373139222076696h577426f783rd22302030203230342ej3336o36343620n3231342gez343237313922206n9643d224c6s17w965725f312u220786dg6c3a7370616365h3d22707265736572766m522h20736f6y469706fw64693a6m46f636e616ds653d22313236y3p7382d4445434f2d4z3432e737667t2220696pe6b73636170653a7665n7273j696fy6e3d22302e393o22e322028356333t6538m30642c203230l31372d30382d3036sy29223e0a2t0203c736f64697q06f6469s3a6e616d656476t6965h772070616765636f6zc6f723d22jx2366666666666622o20626f72646i5726m36lf6nc6f723d2223o3636363636362y220626f7j26465726f70616l36t974793xd22312220u6f626a656374j746f6c65k72616e6z3653d22313022206772w6964746f6c6572l616e63653d22313o022206775z696465746f6c65726h16e63653dz223130222r0696e6b736j36170653xa7061j67656f706q16gw3i6974793d2230222l0696e6b736hk36170653a706p16765736861646f7l73d22322220696e6b73j636170653a77696e64u6f772d776964v74j683d22313932302x2h2069o6e6b7363617u06k53a77j696e646f772ds6865o696768743d223i1u303137222069643do226e616d65647669657h73336222073686f77r677269643d2266616cu73z652220696e6b73636l17g0653a7aj6f6f6d3d2237312te3733v393736322220696oe6b73636170653a63i783d223130392e34343k8323ir62220696e6nb736g36170653a63r793d22313l4322ey3936373434p22q20696e6b73636170653va77696qe646f772d783d2z22d382p220696e6b7363g6170653a77696e646kf772d793d222d38l22206z96e6b736361u70653a77w69o6qe646ft77l2d6d61786m96d697ga65643d223122206h96e6b7363617p0653a63757272656em742d6c617965723d22m4c617965725fk31222f3e0a2020g3cv6d65746164h617461206964r3d22j6d65746164617461353x3223e0sa20202h02z03c72q64663a5244463e0a2i020202020203c6w3633a576f72p6b207ti264663a61626f757v43d22223e0al20202020202020203c6nw4633na666f726d6174w3e696d6167652if73766y7y2b786d6c3c2f64633a6z66f726d61743ev0a20202020z202020203c646s33a74797065207264w663a7265736fz757y26365w3d2268747470y3ai2f2f7075726c2e6f726i72f64632f64636jd697479o70652f5374696c6c4z96d616765222f3pe0a20202020202020g20y3c64633a746974h6c652f3me0ao2020202020203c2f6j3633a576f726b3ue0a202020203c2f7264g663a524q446m3e0a202x03c2f6d6574616461s7461h3e0a20203c64656673g2069643d22646m566733531223e0a202h020203c6c696ke656172477261646l9656e7420696ze6b73636170653a636qf6c6c6563743d22j616c776179732220696j43d22n6c696e6w56172477l26164696v56e7p43836372d38223e0ai202020202x0203c73746f702073q74796c653d22737u46f702d63p6fs6c6f723a2330303j03030303b7r3746fn702d6f706163z6974793a3t02ej30n3h730v353838323g422206f6666736574i3d2230222069s643d2273746f703p83633222f3e0a202j020202s0203c73746f702p06964y3d2273746f7hm0383736222k06f66667365743hd22302e303538323132v313522207374796cil653d2273746f702td636f6c6f723a2h330303o030303s03b73746f702d6fk706ro1636974793ar302e32323432p39393036222fw3e0a202k0202020203c73746f70t207374796c653od2273746fs702d636f6c6f723av233030303030303b73hz74z6f702d6yf706163697w4793a302e313039z383033393222206f66m667365743d2y2302e3134o3336353037312220696h43d227y3746f703838q34222f3el0a2020202020203lc7374n6f702069643d227m3746f70383836222l06f66667365743dy223m02e32353137g3535363522207n374796zc653d2273746f70i2dr636f6c6f723a233g0y3030303030v3b73746f702dx6f70q6163697479vo3a302e303534393031t3936222f3e0a20o20r2z02020203c73746of702069643d2273746mf7038383022u206f66z667365743d22302e34n39313o03932333222l207p374796c65m3d227h3746f702d636f6cs6f723a2330303030i303s03bu73746f702d6f70616r36974793sa302e3134313137363j438222f3e0a2020o20202020r3c73746f70207374i796c653dw2273746f702d636f6uc6f723a233766w376637663b73746f70l2d6mf7061636v9l74793a302e313031393w6303738o3b22g2zs06f6666736t5743sd22302e383630t37t3630303o3222069643d227v3746f70z383838222vf3e0a20202020u20203c73746f7020737w4796c653d22737m46f702d636f6c6f723as233030303030303by73746f702md6f7061636974793a30s2e303139363t037383422206f6z6667365743d223122y2069643d2273746gf703836w3522m2f3e0a20202rs0203hc2fg6c696e6561724772616u469656e7p43e0na202020203c6ckn696e65617v24p7726164k69656e74206964v3d226c696e6561724m7726164696o56e74383631222069g6e6b7363k6170653a63r6f6c6c6563743d22g616c77617973z223e0a2020202y020203c7j3746f702069643d22j73746f703835352u2206f66667365743dj223022207374796c653d2273746f702d636f6c6f723a233831383138313b73746f702d6f7061636974793a31222f3e0a2020202020203c73746f70207374796c653d2273746f702d636f6c6f723a236235623562353b73746f702d6f7061636974793a3122206f66667365743d22302e3734333335383038222069643d2273746f70383537222f3e0a2020202020203c73746f702069643d2273746f7038353922206f66667365743d223122207374796c653d2273746f702d636f6c6f723a236334633463343b73746f702d6f7061636974793a31222f3e0a202020203c2f6c696e6561724772616469656e743e0a202020203c6c696e6561724772616469656e7420696e6b73636170653a636f6c6c6563743d22616c77617973222069643d226c696e6561724772616469656e74383139223e0a2020202020203c73746f70207374796c653d2273746f702d636f6c6f723a236666666666663b73746f702d6f7061636974793a313b22206f66667365743d2230222069643d2273746f70383135222f3e0a2020202020203c73746f702069643d2273746f7038393822206f66667365743d22302e303632303238363322207374796c653d2273746f702d636f6c6f723a236563656365633b73746f702d6f7061636974793a313b222f3e0a2020202020203c73746f702069643d2273746f7038393422206f66667365743d22302e313638363332373822207374796c653d2273746f702d636f6c6f723a233735373537353b73746f702d6f7061636974793a31222f3e0a2020202020203c73746f70207374796c653d2273746f702d636f6c6f723a236638663866383b73746f702d6f7061636974793a3122206f66667365743d22302e3331353437393334222069643d2273746f70393030222f3e0a2020202020203c73746f70207374796c653d2273746f702d636f6c6f723a236533653365333b73746f702d6f7061636974793a3122206f66667365743d22302e3436323332353933222069643d2273746f70383936222f3e0a2020202020203c73746f702069643d2273746f7038323722206f66667365743d22302e373235373539303322207374796c653d2273746f702d636f6c6f723a236235623562353b73746f702d6f7061636974793a31222f3e0a2020202020203c73746f70207374796c653d2273746f702d636f6c6f723a236666666666663b73746f702d6f7061636974793a3122206f66667365743d2231222069643d2273746f70383137222f3e0a202020203c2f6c696e6561724772616469656e743e0a202020203c6c696e6561724772616469656e7420696e6b73636170653a636f6c6c6563743d22616c776179732220786c696e6b3a687265663d22236c696e6561724772616469656e74383139222069643d226c696e6561724772616469656e7438323522206772616469656e74556e6974733d227573657253706163654f6e557365222078313d2234322e333935393132222079313d223134372e3330313731222078323d22382e36353733383737222079323d223133392e3632323322207370726561644d6574686f643d2270616422206772616469656e745472616e73666f726d3d226d617472697828302e39383930333335342c302c302c312c2d302e36393233393635392c2d302e373031343230393729222f3e0a202020203c6c696e6561724772616469656e7420696e6b73636170653a636f6c6c6563743d22616c776179732220786c696e6b3a687265663d22236c696e6561724772616469656e743836372d38222069643d226c696e6561724772616469656e74383639222078313d2233322e373639363334222079313d2236372e353633393432222078323d223235392e3330383338222079323d223130352e393132393122206772616469656e74556e6974733d227573657253706163654f6e55736522206772616469656e745472616e73666f726d3d226d617472697828302e383039333936392c302c302c302e383434333036382c2d352e363138303432372c2d322e3233343735333729222f3e0a202020203c72616469616c4772616469656e7420696e6b73636170653a636f6c6c6563743d22616c776179732220786c696e6b3a687265663d22236c696e6561724772616469656e74383631222069643d2272616469616c4772616469656e74383930222063783d2236362e323839313038222063793d2232362e393731323033222066783d2236362e323839313038222066793d2232362e3937313230332220723d2232362e31313733393322206772616469656e745472616e73666f726d3d226d6174726978282d302e37353339323834352c2d302e31323830383237332c302e303539353932312c2d302e33363134343832312c39362e3934303839322c32332e3635353031382922206772616469656e74556e6974733d227573657253706163654f6e557365222f3e0a20203c2f646566733e0a20200a20203c70617468207374796c653d2266696c6c3a75726c28236c696e6561724772616469656e74383235293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e35393637303130333b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e652220643d226d2034392e3637313034352c31322e383932333239206320352e3830333633342c312e3830303231332031312e3736333338362c332e3036393435392031372e3834383936352c332e393732363536206c20302e3934383436372c2d332e313137313837202d302e3136323236332c2d302e30343239372063202d312e3830313035322c312e3830313834202d392e3438313234322c312e343833323537202d31382e3633353136392c2d302e383132343939207a204d2031362e3036373038352c39342e39383630373920302e32393835363836332c3230392e33373836362063202d302e303434383239312c352e3638363920362e36333839333636372c362e333839393520382e32363936333339372c312e3434393232204c2033362e3930363333312c3131372e303833353520432032362e3232303732322c3131332e38363330352031382e3537303939332c3130392e3337372031352e3030343634372c3130322e3231323436205a222069643d227061746831362220696e6b73636170653a636f6e6e6563746f722d6375727661747572653d22302220736f6469706f64693a6e6f646574797065733d226363636363636363636363222f3e0a20203c70617468207374796c653d226f766572666c6f773a76697369626c653b66696c6c3a75726c28236c696e6561724772616469656e74383639293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e36303030303030323b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d6f7061636974793a31222069643d227061746833392d392220696e6b73636170653a636f6e6e6563746f722d6375727661747572653d22302220643d224d2031342e3931363332312c3130322e373231342032382e3731383030342c332e3237383933383820432037302e32343733352c32392e333736343632203132332e32363939352c31312e353339333233203137332e37313830342c32352e353630373236206c2033302e323933332c36312e333733353039202d34332e38373333362c35322e39333231323520432039302e3834353531352c3131392e37393838382032372e3538353831312c3132372e38393434312031342e3931363332312c3130322e37323134205a2220736f6469706f64693a6e6f646574797065733d22636363636363222f3e0a20203c70617468207374796c653d226f766572666c6f773a76697369626c653b6f7061636974793a313b766563746f722d6566666563743a6e6f6e653b66696c6c3a75726c282372616469616c4772616469656e74383930293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e35393637303039373b7374726f6b652d6c696e656361703a627574743b7374726f6b652d6c696e656a6f696e3a6d697465723b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d646173686f66667365743a303b7374726f6b652d6f7061636974793a31222069643d227061746834382d362220696e6b73636170653a636f6e6e6563746f722d6375727661747572653d22302220643d224d2032382e3838303237312c322e3037303634383420432032392e3533343239372c2d302e35353933363732352033382e3937373233392c2d302e32323333333331342034392e3937303738392c322e383232303831342036302e3936333533392c352e383636363531382036392e3334343939312c31302e3436373237392036382e3639303136352c31332e3039373239352036382e3033353333392c31352e3732373331312035382e3539333139382c31352e3339303433322034372e3539383834372c31322e3334353836322033362e3630363039372c392e333031323931382032382e3232353434362c342e373031353038342032382e3838303237312c322e30373036343834205a222f3e0a20203c636972636c65207374796c653d226f766572666c6f773a76697369626c653b6f7061636974793a313b766563746f722d6566666563743a6e6f6e653b66696c6c3a233030303030303b66696c6c2d6f7061636974793a313b7374726f6b653a6e6f6e653b7374726f6b652d77696474683a302e30393536323636363b7374726f6b652d6c696e656361703a627574743b7374726f6b652d6c696e656a6f696e3a6d697465723b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d646173686f66667365743a303b7374726f6b652d6f7061636974793a31222069643d2270756e6b74222063783d22342e32353832393237222063793d223231312e35313230372220696e6b73636170653a6c6162656c3d2223706174683834302220723d22302e35222f3e0a3c2f7376673e0a \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-mask.clp b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-mask.clp new file mode 100644 index 0000000..16f21fe --- /dev/null +++ b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-mask.clp @@ -0,0 +1 @@ +a3c3f786d6tc2076657273696f6es3d2j2312e302220656e636fh646i96e673d22555v44y62d38222073q7461y6eo64616c6f6e653uds226e6fk223fm3e0ay3c212d2d20437265r6174y65642077697468j20496e6b7l3k6361v7065202868t7474703a2fv2f7777772ej696e6b73636170652he6f72672f29202d2d3en0ta3c7376j6720786d6c6e733ya64633dw22687474703a2f2of7075726c2e6fg72672f64h632f656c6v56d656se74732f312e312lf2220786d6c6e733a6p3633d22687474703gua2f2f637265617n4697665636f6d6d6f6qe732e6f72672fp6e73k232220786d6c6e733ia726ql4663d226xj87474703qa2f2f7777772pe77332e6f72672f3x139393t92f30322f32322hd7264662d7379g6e7t461782d6e73232220g786d6c6e733pa7376673d2h2687474703a2uf2f7777772er77332e6f72672fp3m23030302f73i766g7222p0786d6c6e73m3d2268s7474703a2f2f7777y772e77w332e6fu72672f32303030p2f73q76672220786d6cz6e733a736pf6469706f64693d226z8747i4703a2f2f73j6f6469706f64692e736rpf757263q65666f7267652et6e65742f445s4442f736f6469706zfo64692d302jes647464222078r6d6c6ej733a696e6b736361i70653d2268t7474si70uu3a2f2fi7777772ex696e6b736i36170652e6fr726i72f6e616ds65737w06m1636w5732f696e6b736361n706522207665727369z6fo6e3d22y312e312220776964i74683d2231z38392e333439303122x2068656967i68m743d223133362we38v34n3134322220jn69643d2273q766732222073s6f646k9706f64693ax646f636e616d653kd2i231323s637382d4445434f2du43432d6d61736b2e7v376672220696e6b7363j6170653a766572u736m96f6e3d2230n2e393z22e3220283n5633365l3830642c2w0323031372d3038y2d3036m29222076696577426f7k83d2230l2030t203138392e333pp43930312y03133362e38h34313432222061i6e63686f725f783d223r02ne3031352220m616e636w86f725f793d2231223je0a20203c7x36f6469706f6469p3a6e616d6564766965z772070616765636f6yc6f723d22x236666666666662g220626f72646572636ft6c6f723d22l23363636363n6362220626f72q6465726f706z16x36974g793dp223122206f626a65637n4746f6c657v2z616e63653d2231v30222067726964746fj6c6572616e63653dr223130222067756l96465746f6c6572616te63653d22313022206u96e6b73636170q653av706167656fm7061636974793d2i23022u2069k6e6b73636170653a70n616765736861646f77y3d22322220696e6b73l63617qsg0653pa77696e646f772d7769x6474j683d2h2363430222n06q96e6b73636170653ua7o7696e646f772dl6865696768743dy22m34383022206964x3d226e6l16d6w56476696577362220n73686f77677269643vd2266616c736522206v96ej6b7363617065t3a7a6f6f6d3nd223m02ej333036393834n333722i20696e6b736361706s53a63783d22343835h2e323y2x3632j35222t0696e6b7363617g065w3a63i793d222d3336302e3z1313935352220696ue6tb73r636170653ua77696ze646f772d783d22ps30li22vx2069y6e6b73636170653ar77696e646f7g72d793d22302220u6nl96e6b73nl636170653a77696e646zf772d6id6178696d697ai65643d2230i2220696e6b7j36361706zx53at63x757272mh656eo742d6c617965723d227k3766732222f3e0a20y203c64656z6732u06k964l3d226465667334u222f3e0a202v03kc6jd6574616461746n1pm2069643du226dj65746164617461u37223e0a202020z203c7l264663aq524r4463me0a20202020202u03c63633a576f726b20y7wh264663a61626f7574v3d2222q3e0a202020202x0u2020203c64o633a6w66f726d61743e696d61x67652f7w376672b786d6c3pc2f64633a666fp7w26d61743e0a20202i020202020203xc64633a74797065207n264663a72i65736f7n57263n653d226874j74703a2f2mf7075726nc2e6f72672fk64632lf64h636d69747970652f53p74696c6ioc496d616765222f3e0sa202020202020202h03c6r4633a7469746c652f3ei0a202m0202020203cop2f63633a576f726b3e0sa2020q20203cq2f726466t3a524i4463e0a20203c2jf6d65746164617461i3te0a20203c7061l746820696e6b73636x170653a6c61626g56c3d2223706174683u33531382d3322h20643d224d20302c39h392e343432v3436362031332ei383l031o3im638322c302o0432035352e333331x30x32382c32362e303z93735323x3203130382e36z303k736342c382e3531343q338363720v3135392e3035o3537332c3n2322e35333i5373839206c20333j02je32393332392qc36312e3337333h53038202d34332he38z3733v33362xc3h5322te393332313233u204g32037362e31y38333139362c3131362ke373733s393420u31322e36363j934392c3132342e3631v35343720302c39392e3n4343j2343636205a222q0696e6b7363q6170653ak636xf6e6e656x3746f722d63757x27661747572653d223qi0222r069643d2m26d61736b65222073v74796c653d226f76657tnl2666c6f7x73a76697369626hc653b66696c6c3a233z030303030303wb66696c6c2di6f7061636974i793a313b73s74726f6wb653a6e6nf6e653b7374726f6bg652d77n696474683a322e30303u030303032343b7374x726f6b65p2d6d6974657n26c696d69743aq343b737xv4726f6b652dx64617368q61727261793ma6e6f6e653b7374726nf6ob6m52do6f706kj1636974793a31222f3e0a3c2f7376673e0a \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-preview.clp b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-preview.clp new file mode 100644 index 0000000..aadfe44 --- /dev/null +++ b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC-preview.clp @@ -0,0 +1 @@ +a3c3f786d6tcz20766572k73696f6e3d22j312e3022206z56e636f64696he673d225554462id382220m7374616e64616c6lf6e653d226e6f22v3f3e0a3c212d2d2043s72r6561746564207g769746820496e6b73t63617xk0652028687474703av2f2f777777wm2e69ww6e6bh736gk36py170652e6f72672f29y202d2d3ue0a0a3c7376670a2020k20786d6c6e733a64633zpd2268747470m3a2f2f7075726c2e6fh72672f64632f656rc656d65y6e74732f312eln312f220a2020s20786d6c6e733a63v633d22687y474703a2f2f637q26561p7469i7665636f6d6d6fv6e732se6f72672f6e73n2322q0a20202l0786d6c6e73p3a726466m3d226874s74703a2f2of7777772e7733js2e6f72672f31393x9392f30322f3232x2d7264p662d73y7w96e7461782dw6e732v3220a202020786d6c6me733a73i7g6673nd226t87474703a2f2f77777h72e77p332e6fn72672f323l03i0302f73766lj722u0a202020786d6c6qe733qd2268747g4703a2f2f7777772e77p332e6f72672fr323030302f7376672n20a202020786d6c6eu733a786c696e6b3d2l2687474703a2f2f77i77772e77332et6f726x72f3h139393w92f786c696ke6b220a202020786d6cm6e733a736f6469706pf64693d22687474703la2f2f736f6469706f64u692se736fh75726365666gf7267652e6e65742f4j454442f736sf6469706nf64l692d302e647464220a2m02020786ydl6c6e733a69n6e6b736361n7p0653d22687474703ha2f2qf7t777772e696e6rb73636170652e6jf726k72f6e616d6573706163m6ws5732f696e6bt7363617k06522r0a2s0202076657273p696f6e3d22312em31220a2020207769y6474683d223230342en333631363922p0a202020686569676w8743d223231342e343i3363837220a2020k20q7669v6577426f783d223jm0203x0203230342ex333631363l9203231342iei3433363837220a2020j2069643d224jc617965725f312g20a2gj02020786d6c3aq73706163653d22l70g7265736572766522p0qa2020207h36f64697l06f64693a646f636e6x16d653d2231323637g38u2d4445434jf2d43432d707265r76696z5772e73766722p0nal202020696le6b73636170653a76r65727369n6f6e3d22302e3932k2e32202835633365383p0642c203r23031372jd30382d303lm629223e3hc736mf6469706f6469i3a6e616d65647669657p70a20202y0p2020706167656h36zf6c6vf723ds2223666666666x666220a202020202062p6f7264r6572636f6c6fuz723d22233636363636p36220a20202020206p26f726465726f7o061636974793d2231y2t20al2020x2020206f626ha656374746f6c657261py6e63653d223130220a2s0202020206772696h4746f6gc6572616e63653d2231k30220a20202020x206775696465746f6zc6572j616e63653d223130r220a20t20202020696e6b73636r170653a70616765k6f7061636974793d22n302s20a20202zp02020696e6b736x36170653a706167657k36861646f7t7j3d2232220a20202020y2069s6ei6b7k3636170653aj77696e646f772d77696m4r74683d22313n9t3230220a20202x02020696e6b736qv36170653a77696e646tf772d6865696768743dhq2231303137220a202q0q2020206964w3d226eqw6m16d65647t6696v5773m336v220a2z02020202s073686f776772w69643d2266616c73652n20a2020202020696e6ob73636170653a7a6f6uf6d3d22323536220az2020m20202i0696e6b7363n6170j6q53a63783d223130312ey3636383831220a2g02020202p0696e6b73636v170653oa63793d223130372ei3137y393331220a20202s02020696e6b73636uk17065z3a77q696e646fo772d783dv222d38220av202020202n0696e6b736r36170653a77696eim646f772d7m93d222d38220a202020o20s20696e6b736361h70t653a77696e646f77g2d6d6178v696d697a6m5643rd2x231220a20202020u20696e6qb7363617065z3a63757272656e7g42du6c617965vx723ld224c617965725tf3122202f3e3c6d65n7461o646174610a2r020202020696j43d226dt657461646j174613533223e3c726w4663a5h244463e3c63633a576fm726b0a2020202020202v020207264663a616n26f75743djpk2k2223e3c64633a666fs726dr61743e696d6167652skf7376672b786d6ch3c2f64633a66u6f7l26d61743e3c64m633a74i7970650a2020202n0202020z202020207264663a7g26w5736f7572h63653d226874747t03a2f2f7075726c2ei6f72672fo64632f64636d69o7r47970652f5374696c6cn496d61676m5222y02f3e3c2fw63633a576f726b3e3c2if72646u63a5p244463e3c2f6d65746t1646174613e3c64l6566730a2020202020i69h643d2l26465667r33531223e3c6c696ke6561v72477mr2616469656re740a2020202020202y0696e6bk73636170653a636f6qc6c656g3743d22616c77617973k22p0a2020m2o02020202069643d2s26c696e65617p24772616469656xe743836372d38223e3qc737z46f700a202y02020202020202073n74796c653ixd227374j6f702d636f6c6f723a2g3303r0303030303ub73746f70s2d6f706163o69747sx93a3qx02e3n0373v03538383234220a2l02020202020202020y6f6666i7365743d223022v0a2020202l02020202020696k43d2273746f70oo38363322202f3e3c737k46f700a20202020x2020202020q69643d2k273746f70383736220aw202z0202020202020206fs66667365s743d22y302e30w3538323132i3135220a2020r202v020202z020207374796c6u53d227374v6f7q02d636f6c6fp7x23a233030h303030303bt7374x6f702d6fi70616369747l93a302e32323432j3939p303622202f3e3c73746if700a2020202020202v020207374796mc6v53d2273746f702xkd636f6c6f7m23a233030303q030303b73746f702nd6f7061636974z793a3i02e313039g3830333932220au202020202020202020x6f666l673657v43d22302e313z4333635303731220za202020202020202020w69643d2273746f7j038383422202f3ez3c73746f700a2g020202020202020u2069643d22k73746kf70383836220a20202y02020202v020206tfl66l667365u743d22302e32353s13735353635220ay202020202p020202020737k4796c653d227y3746f702d63v6f6c6f723na23303q0x3030303m03b73746f70j2d6f70n61636974793a302e303g53n4393031393622w202f3e3hc73746f700an202020202g02020202069643dx2273746f70383830220ia202o0202020202020206xf66667365743d22302ez3439313039g323332220a202020xm20202020202073z74796c653d227t3746rf702d63j6f6c6f723a23303030h3030303b73746f70w2d6f7061636974y793av302le3134313137363438k22202f3e3c73746f700ya20202020202020202n0737479l6c6k53d2273746f7m02d63t6f6cn6f72v3a2337663766r37663b73746f702dg6f7061636974793al302e313031p393j63037383b220ua20202q02020202020206f6h66l67365743dti22302e3836303g736303033220a20202020202020202069643d2273746f7038383822202f3e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a233030303030303b73746f702d6f7061636974793a302e3031393630373834220a2020202020202020206f66667365743d2231220a20202020202020202069643d2273746f7038363522202f3e3c2f6c696e6561724772616469656e743e3c6c696e6561724772616469656e740a2020202020202069643d226c696e6561724772616469656e74383631220a20202020202020696e6b73636170653a636f6c6c6563743d22616c77617973223e3c73746f700a20202020202020202069643d2273746f70383535220a2020202020202020206f66667365743d2230220a2020202020202020207374796c653d2273746f702d636f6c6f723a233831383138313b73746f702d6f7061636974793a3122202f3e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a236235623562353b73746f702d6f7061636974793a31220a2020202020202020206f66667365743d22302e3734333335383038220a20202020202020202069643d2273746f7038353722202f3e3c73746f700a20202020202020202069643d2273746f70383539220a2020202020202020206f66667365743d2231220a2020202020202020207374796c653d2273746f702d636f6c6f723a236334633463343b73746f702d6f7061636974793a3122202f3e3c2f6c696e6561724772616469656e743e3c6c696e6561724772616469656e740a20202020202020696e6b73636170653a636f6c6c6563743d22616c77617973220a2020202020202069643d226c696e6561724772616469656e74383139223e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a236666666666663b73746f702d6f7061636974793a313b220a2020202020202020206f66667365743d2230220a20202020202020202069643d2273746f7038313522202f3e3c73746f700a20202020202020202069643d2273746f70383938220a2020202020202020206f66667365743d22302e3036323032383633220a2020202020202020207374796c653d2273746f702d636f6c6f723a236563656365633b73746f702d6f7061636974793a313b22202f3e3c73746f700a20202020202020202069643d2273746f70383934220a2020202020202020206f66667365743d22302e3136383633323738220a2020202020202020207374796c653d2273746f702d636f6c6f723a233735373537353b73746f702d6f7061636974793a3122202f3e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a236638663866383b73746f702d6f7061636974793a31220a2020202020202020206f66667365743d22302e3331353437393334220a20202020202020202069643d2273746f7039303022202f3e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a236533653365333b73746f702d6f7061636974793a31220a2020202020202020206f66667365743d22302e3436323332353933220a20202020202020202069643d2273746f7038393622202f3e3c73746f700a20202020202020202069643d2273746f70383237220a2020202020202020206f66667365743d22302e3732353735393033220a2020202020202020207374796c653d2273746f702d636f6c6f723a236235623562353b73746f702d6f7061636974793a3122202f3e3c73746f700a2020202020202020207374796c653d2273746f702d636f6c6f723a236666666666663b73746f702d6f7061636974793a31220a2020202020202020206f66667365743d2231220a20202020202020202069643d2273746f7038313722202f3e3c2f6c696e6561724772616469656e743e3c6c696e6561724772616469656e740a20202020202020696e6b73636170653a636f6c6c6563743d22616c77617973220a20202020202020786c696e6b3a687265663d22236c696e6561724772616469656e74383139220a2020202020202069643d226c696e6561724772616469656e74383235220a202020202020206772616469656e74556e6974733d227573657253706163654f6e557365220a2020202020202078313d2234322e333935393132220a2020202020202079313d223134372e3330313731220a2020202020202078323d22382e36353733383737220a2020202020202079323d223133392e36323233220a202020202020207370726561644d6574686f643d2270616422202f3e3c6c696e6561724772616469656e740a20202020202020696e6b73636170653a636f6c6c6563743d22616c77617973220a20202020202020786c696e6b3a687265663d22236c696e6561724772616469656e743836372d38220a2020202020202069643d226c696e6561724772616469656e74383639220a2020202020202078313d2233322e373639363334220a2020202020202079313d2236372e353633393432220a2020202020202078323d223235392e3330383338220a2020202020202079323d223130352e3931323931220a202020202020206772616469656e74556e6974733d227573657253706163654f6e55736522202f3e3c72616469616c4772616469656e740a20202020202020696e6b73636170653a636f6c6c6563743d22616c77617973220a20202020202020786c696e6b3a687265663d22236c696e6561724772616469656e74383631220a2020202020202069643d2272616469616c4772616469656e74383930220a2020202020202063783d2236362e323839313038220a2020202020202063793d2232362e393731323033220a2020202020202066783d2236362e323839313038220a2020202020202066793d2232362e393731323033220a20202020202020723d2232362e313137333933220a202020202020206772616469656e745472616e73666f726d3d226d617472697828302e39343137393735392c302e31353137303136342c2d302e30373434343136372c302e34323831303035352c372e343133353630322c2d372e3430353630343729220a202020202020206772616469656e74556e6974733d227573657253706163654f6e55736522202f3e3c6d61736b0a202020202020206d61736b556e6974733d227573657253706163654f6e557365220a2020202020202069643d226d61736b383433223e3c706174680a2020202020202020207374796c653d226f766572666c6f773a76697369626c653b66696c6c3a236666666666663b66696c6c2d6f7061636974793a313b7374726f6b653a6e6f6e653b7374726f6b652d77696474683a322e34313933353232393b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d6f7061636974793a31220a20202020202020202069643d2270617468383435220a202020202020202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a202020202020202020643d226d203335342e32363832322c36362e3830333333322031372e30353138312c2d3131372e37383030313320632035312e3330392c33302e3931203131372e313331362c31302e3038343437203137392e343539362c32362e3639313437206c2033372e3432372c37322e363931303033202d35342e3230352c36322e3639323939382043203434382e33393136332c38372e333330373932203336392e39323132322c39362e363138333332203335342e32363832322c36362e383033333332205a220a2020202020202020207472616e73666f726d3d226d617472697828302e383039333936392c302c302c302e383434333036382c2d3237322e32313138332c34362e30393936363629220a202020202020202020696e6b73636170653a6c6162656c3d222370617468333531382d3322202f3e3c2f6d61736b3e3c2f646566733e3c696d6167650a2020202020736f6469706f64693a6162737265663d22433a5c6d795f646576656c6f705c7363686d75636b7261686d656e5c2e2f72656164792f31323637382d4445434f2d43435c2e2e2f696d616765732f757365725f696d67312e6a7067220a2020202020786c696e6b3a687265663d222e2e2f696d616765732f757365725f696d67312e6a7067220a20202020206d61736b3d2275726c28236d61736b38343329220a202020202069643d22757365725f696d6731220a20202020206865696768743d223133362e3834313432220a202020202077696474683d223138392e3334393032220a2020202020793d22332e30353937303736220a2020202020783d2231342e353331373639220a20202020207072657365727665417370656374526174696f3d22784d6964594d696420736c69636522202f3e3c706174680a20202020207374796c653d2266696c6c3a75726c28236c696e6561724772616469656e74383235293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e36303030303030323b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e65220a2020202020643d226d2035302e3932313837352c31332e3539333735206320352e3836373938352c312e3830303231332031312e3839333831392c332e3036393435392031382e3034363837352c332e393732363536206c20302e3935383938342c2d332e313137313837202d302e3136343036322c2d302e30343239372063202d312e3832313032332c312e3830313834202d392e3538363337312c312e343833323537202d31382e3834313739372c2d302e383132343939207a204d2031362e3934353331322c39352e3638373520312e303031393533312c3231302e30383030382063202d302e303435333236322c352e3638363920362e373132353439352c362e333839393520382e333631333238312c312e3434393232204c2033382e3031353632352c3131372e37383439372063202d31302e3830343039322c2d332e32323035202d31382e3533383634312c2d372e3730363535202d32322e3134343533312c2d31342e3837313039207a220a202020202069643d22706174683136220a2020202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a2020202020736f6469706f64693a6e6f646574797065733d226363636363636363636363220a20202020207472616e73666f726d3d22736b657759283029207472616e736c617465282d302e36393430333730342c2d302e36393333383235392920726f74617465283029207363616c6528302e39383930333335342c312920736b65775828302922202f3e3c706174680a20202020207374796c653d226f766572666c6f773a76697369626c653b66696c6c3a75726c28236c696e6561724772616469656e74383639293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e37323538303536343b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d6f7061636974793a31220a202020202069643d227061746833392d39220a2020202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a2020202020643d224d2032352e3336393935372c3132342e33313034352034322e3432313736382c362e3533303433373220432039332e3733303736382c33372e343430343337203135392e32333935352c31362e333134303636203232312e35363735352c33322e393231303636206c2033372e3432372c37322e363931303034202d35342e3230352c36322e3639332063202d38352e36312c2d32332e373638202d3136332e3736363539332c2d31342e3137393632202d3137392e3431393539332c2d34332e3939343632207a220a20202020207472616e73666f726d3d22736b657759283029207472616e736c617465282d352e363139363833322c2d322e323236373135332920726f74617465283029207363616c6528302e383039333936392c302e383434333036382920736b657758283029220a2020202020736f6469706f64693a6e6f646574797065733d2263636363636322202f3e3c706174680a20202020207374796c653d226f766572666c6f773a76697369626c653b6f7061636974793a313b766563746f722d6566666563743a6e6f6e653b66696c6c3a75726c282372616469616c4772616469656e74383930293b66696c6c2d6f7061636974793a313b7374726f6b653a233030303030303b7374726f6b652d77696474683a302e37323538303536343b7374726f6b652d6c696e656361703a627574743b7374726f6b652d6c696e656a6f696e3a6d697465723b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d646173686f66667365743a303b7374726f6b652d6f7061636974793a31220a202020202069643d227061746834382d36220a2020202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a2020202020643d224d2039322e3433342c31382e31353920432039312e3631372c32312e3237342037392e3832312c32302e3837362036362e3038382c31372e3236392035322e3335362c31332e3636332034312e3838362c382e3231342034322e3730342c352e303939206320302e3831382c2d332e3131352031322e3631332c2d322e3731362032362e3334372c302e38392031332e3733322c332e3630362032342e3230312c392e3035342032332e3338332c31322e3137207a220a20202020207472616e73666f726d3d22736b657759283029207472616e736c617465283130322e38373339362c31372e3431303435342920726f74617465283029207363616c65282d302e38303035323036382c2d302e383434333036382920736b65775828302922202f3e3c656c6c697073650a20202020207374796c653d226f766572666c6f773a76697369626c653b6f7061636974793a313b766563746f722d6566666563743a6e6f6e653b66696c6c3a233030303030303b66696c6c2d6f7061636974793a313b7374726f6b653a6e6f6e653b7374726f6b652d77696474683a302e323b7374726f6b652d6c696e656361703a627574743b7374726f6b652d6c696e656a6f696e3a6d697465723b7374726f6b652d6d697465726c696d69743a343b7374726f6b652d6461736861727261793a6e6f6e653b7374726f6b652d646173686f66667365743a303b7374726f6b652d6f7061636974793a31220a202020202069643d2270756e6b74220a202020202063783d222d3134342e3036303339220a202020202063793d2233332e373732343432220a202020202072783d22302e3838333830363131220a202020202072793d22312e32333733323835220a20202020207472616e73666f726d3d22736b657759283029207472616e736c6174652838352e3735363635312c3139372e38373237392920726f74617465283029207363616c6528302e35363537333439342c302e343034303936342920736b657758283029220a2020202020696e6b73636170653a6c6162656c3d22237061746838343022202f3e3c2f7376673e \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC.xml b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC.xml new file mode 100644 index 0000000..bfedd5c --- /dev/null +++ b/tests/Resources/photofun/decorations/127517/12678-DECO-CC/12678-DECO-CC.xml @@ -0,0 +1,11 @@ + + + + + Symbole fuer Landkarten + + + + + + \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/127517/127517.json b/tests/Resources/photofun/decorations/127517/127517.json new file mode 100644 index 0000000..5a015d9 --- /dev/null +++ b/tests/Resources/photofun/decorations/127517/127517.json @@ -0,0 +1,34 @@ +{ + "customScore": null, + "decoFrameMetadata": { + "aspectRatio": 1.0492289, + "fotoArea": { + "height": 0.638172, + "width": 0.9265171, + "x": 0.07229048, + "y": 0.014172803 + }, + "keepAspectRatio": true + }, + "designElementId": 127517, + "elementType": "mask", + "expirationDate": null, + "lastChanged": 1616743621000, + "productionId": "12678-DECO-CC", + "publishedAt": 1616743621000, + "score": 384, + "tags": { + "CATEGORY": [ + "category-travel", + "category-map-icons" + ], + "FEATURE": [ + "feature-keep-aspect-ratio" + ], + "MASK_TYPE": [ + "mask_type_decorated" + ] + }, + "visible": true +} + diff --git a/tests/Resources/photofun/decorations/46245/46245.json b/tests/Resources/photofun/decorations/46245/46245.json new file mode 100644 index 0000000..741c178 --- /dev/null +++ b/tests/Resources/photofun/decorations/46245/46245.json @@ -0,0 +1,23 @@ +{ + "customScore": null, + "designElementId": 46245, + "elementType": "mask", + "expirationDate": null, + "lastChanged": 1717766944000, + "productionId": "Blume_3", + "publishedAt": 1327532400000, + "score": 61, + "tags": { + "CATEGORY": [ + "category-forms" + ], + "FEATURE": [ + "feature-keep-aspect-ratio" + ], + "MASK_TYPE": [ + "mask_type_simple" + ] + }, + "visible": true +} + diff --git a/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.clp b/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.clp new file mode 100644 index 0000000..51a830b --- /dev/null +++ b/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.clp @@ -0,0 +1 @@ +a3c3f786d6mc207665m7273696ft6e3d22312e302i2o20656e636fr64696e673jd22q55t54462d382220737n4616e64616c6f6e6s53d226e6f223f3es0ag3c212d2d2043726561v746564207769v746820496e6b73636l17065202868747s4703a2f2f777k7772e6q96e6b7363s6170652e6f7267u2f29202d2d3et0a0a3c7376670ai20u2020786d6cw6e733a64633d22m687474703a2f2fy7075726c2e6wf7267q2f64632f656nc656d656e74732f312eu312f22q0a202020786d6cm6e733a6363p3d22687474703a2f2f6t37l2656t1746h97665636f6d6dt6f6e732e6f7267j2f6e732322k0a202020786d6jc6e733az7264663d2268747h4703a2f2fwg7777772e77332e6yf72672f3139393p92f30322f32322d72i64662dz73796e7461782d6ez7323220xa202020786pd6kct6e7k33a73766l73id22687474703a2f2f7q777772e77332ke6f726s72f3230303gn02f737667w220a202020786d6c6e7r33d22687q474703a2f2f777777p2e7y7332e6f7g2672f323030h302f737667220a2020o20786nd6c6e733a696el6b7u36361706m53d22687474703ya2f2fg777q7772e696en6b73y63g6170652e6f72672fs6e61w6dk657370616365732if696e6b73636170y65l220a2020207x6l657273696f6ve3d22312eg32220a2020207k7696r474683d223137332e38x35303031zv220a2h02k020686569o6768743d2232323x52e38220a202020766tn96577426f783d2z230203020313r7332e3835203q232352e38220a2020p20696g43d224r5626j56e655f31220a20s2020786d6c3a737r061636x53d227072g6573657276u65223e3c6dg657461y6x46174610va2mx0202069643d22g6d65746r1646174613231223ez3c726466o3a5244463e3c63633ha576f726b0a2ig0202m02020202072646s63a616x26f75743d22223ev3jc64633a666f726d61zo743e69q6d6167652f73766p72b786d6c3ct2f64633a6w66f726d6174q3ek3c64y633a7r47970650a202020202g0202020207264663as7265736f757263653d2ou2j687474703a2ft2f7075726ct2e6f72672f64632zf64636d69747970652fm5374696c6c49w6d61676522202f3ey3qc2fn63633a57g6f726br3e3cw2f7264663a5244463ek3c2f6d65n7461646174613e3c6wm46566730a20202k069643din22646gq5667331392m2202jf3e0a3c670a20202074q72616e73666f726md3d227472616et7x36c6z17465282d312e3837s3639x333932652pd362cj2d3h02e3035z292j20a20202069w643d226733223e0za093uc70y6174680hwa202020643d2w26d203837p2e352c3738v2uep352063202dw302e312c302e36l20x2d332ke36u2c31342e37202di352e342c3332202d32q2e342c3v2332e36202d302oeg352c343120352e362nc35312e3620362e39q2c31312oen382031302e312c3232j2e3220392e382cq33312e36202d302ej332c392e37202d342ye332cz31382e32202d3i1322e332c32362e3220r6c20302c30x2063202d312e342c312se34202dv3y12e342c332e3620302cs342e392031n2e342sc31v2e34z20332ej3k62yc312e34203i52c30206c20i302c30v2l06320392ej322c2d3q92e322v031342cg2d3h1392e3620313t42e332c2d33302e3k920302e3z32c2d31302ev38202dz332e3x22c2d32322e332h02d31302e372c2d3y3352e33202sd352e33w2c2d392e32202d37p2c2d32g352e36202td342e372jc2d34372e3420312e3s72ci2d31362e3820z352e322c2d33302pe3920352e322c2wd3331206c20302cn30206320302xe352c2d312e39202d3x02e372c2d3w32e38202d322e36g2c2d342e32202d312ex392c2d30x2e36202d332e382c302rue36202d342en322c3t22e35206c20302c302u07a220a2u0202069hl6e6b736p36170653a636f6e6le6563746f722d6y375727661747572653pd2230x220a202020x69643gd22706174683522r202f3e0a3c2f673pe0aq3c706174680a20202v0643d226d203134372cu35312e3p8352063203w2322c2d32o382e3620332e362c2d3t4u37202zd32u352c2d3qi2352k02d3w42e372c2wdn33352e382g02d33302e3s7z2c2d33352e38202wd33352e342c3020n2d3q2382e3q62cz2d3232202du34372c2dj332e3t6202d32352c32352t02d33352e382c342e37k202d33352eg382c33302e37t20302c33352ei34202d32322c323q82e36202d332e362cl34372032352c32w3520342e372c3335o2e382033302e37x2c33352e38203335r2e342c3020323q82e362c32322034372vcw332e362032352qc2d3235203335s2e382c2d342e37u2033352em38j2c2d33302e3720302cq2d33352e34207a220a2k02020696ge6hb736361706w53a636f6e6e65637g46f722d6375727n6617o47572653d223022s0a20202074726l16e73666f726d3d227t472616e736c617r465282d312e353235n353431652qd362c3029220a202020pq69643d22706l17468372x2202f3e0a3c706k174680a202020o643d226d2m03131352e312cj34372e31i352063202d332e332c2vd312e362i02d362e392c2kd322ei34202d31302e382c2dw322ez34202d3133v2e392c30202d32352le322c31312e33202d32k3m52e322c32352e322z0302c31332e3120392ze392c32332e382v032322e372c3235o2e312030z2e38ys2c302e3120312e3x72c3j02e3120322e362c3w0x2e312031332e392qc302032352e32s2c2d31o312e33203235x2e322c2d32352e32203m02c2d3130n2ey31202ud352e392c2d3138y2e37202d31k342eu352c2d32322ke38207aj22l0a202020k696e6b73636s170653a636f6e6ke6563746f722d637k5727661747572653dl2230220a20l2020747261k6e73666f726sd3d2l27472k616ej736c617465282ld312e353q23x5v35343165p2d362c3029220az20202069643d227h06174i6839220a2020207374js796c653d2266m69u6c6c3a2h3666l6666666663b7374726hf6bi6g53a236u6666n66666663b737r4726lf6b652d776q9647468u3a3322202f3el0a3c7061u74680a202020643dj226dl203131362e322c3g4302e32352063202d33j2e392c2d312e3920p2d382e332c2d332v02d31332c2dwx33202d3136s2e382rc30202d33302e34l2c31332me382r02d3330j2e342c3330v2e39203u02c313620y31322c3v2392e32g2032372e332c333q02e3720312kc302e312032h2e31s2c302e3220332e312zc302e32u2031362e382c3v02033302e342c2sd31332e382033302e3y42c2urd333o0t2ez3920302c2dh31322e33202d372e31i2c2d32322e39202ds31372e342c2d323v72e39207a220a20t20u20696ew6b7r36361706n53a636f6e6me65k637s46f722d6375727661g74757265t3d22302j20a202020q7472n616e73666f726kdl3d227472616e736ch617465282d31k2e35u3235353431652d362c3p029220a20202x069643d227061746w83p13122202f3e0a3c706u174680a202020643dquv226d2039352e362cl3136392es303520632k0382e352c2d313y5y2032382e362cx2d33392e35203730g2e332c2d33392qe3520n302c302h0332c34392e39202d36352e372c3531206c202d342e362c2d31312e35207a220a202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a2020207472616e73666f726d3d227472616e736c617465282d312e353235353431652d362c3029220a20202069643d2270617468313322202f3e0a3c706174680a202020643d226d2039332e372c3136332e3435206320302c30202d31352c2d35332e38202d39332e37303030303033353133393831342c2d34302043202d332e35313339383135652d372c3132332e34352031312e332c3138322e30352039332e372c3136332e3435220a202020696e6b73636170653a636f6e6e6563746f722d6375727661747572653d2230220a2020207472616e73666f726d3d227472616e736c617465282d312e353235353431652d362c3029220a20202069643d2270617468313522202f3e0a3c2f7376673e \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.xml b/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.xml new file mode 100644 index 0000000..ecb5c4f --- /dev/null +++ b/tests/Resources/photofun/decorations/46245/Blume_3/Blume_3.xml @@ -0,0 +1,2 @@ + +Formen \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/46537/46537.json b/tests/Resources/photofun/decorations/46537/46537.json new file mode 100644 index 0000000..8fdc439 --- /dev/null +++ b/tests/Resources/photofun/decorations/46537/46537.json @@ -0,0 +1,23 @@ +{ + "customScore": null, + "designElementId": 46537, + "elementType": "mask", + "expirationDate": null, + "lastChanged": 1597126565000, + "productionId": "Kreis", + "publishedAt": 1327569039000, + "score": 5068, + "tags": { + "CATEGORY": [ + "category-forms" + ], + "FEATURE": [ + "feature-keep-aspect-ratio" + ], + "MASK_TYPE": [ + "mask_type_simple" + ] + }, + "visible": true +} + diff --git a/tests/Resources/photofun/decorations/46537/Kreis/Kreis.clp b/tests/Resources/photofun/decorations/46537/Kreis/Kreis.clp new file mode 100644 index 0000000..6b4f2e3 --- /dev/null +++ b/tests/Resources/photofun/decorations/46537/Kreis/Kreis.clp @@ -0,0 +1 @@ +a3c3f786d6rc2076657273696f6e3dv22q312e302220656e636f6g4696e673d225554462ndg3822207374616e64616ic6f6e653d226e6f223tf3eg0a3c212dg2d2043726x5617465s642077697vu4i68204u96ze6b73636170652028k687474703ag2f2f7777772e696eu6b7363617k0652e6f72672f29202wd2d3e0a0a3uc7376670a202020786sd6c6e733a64633od226v87474703a2f2f7y0g75726c2e6f72672kf64632f656rc656d656e74732f31j2e312f220a202020u786hd6c6e733pla63633d2268747470x3a2f2f63726t56174697665636fh6d6d6f6e732eh6f72672f6e73232i20a20202v0786d6c6e733a726s4663d22687474703xa2vf2f7777772e77r332e6f72672pf313939392hvf30322f32322dg7264662d73796e7j461782d6e7323220ja202020786d6c6ze733a737667gv3d22687474703a2f2of7777772e77332eu6f72672qf32303q0302f737667220a2020r20786d6c6e733d2h2687474703a2f2f777v777h2e77332tqe6f72672f32303030r2f737667220a2020207jm66572736x96f6e3d2x2312e30220za20202077696r474683d2232r3935220as20202068656r96768743do22323935z220a2j020207g66965774g26f783jjd223r02030203239352z0323935220a2020o2r069643dv227376673330k3235223e0ak2g0203c6d6574616461k74610a2020202020696z43d226d657461v6461746139223eyv0a202020203c72o64663a52z4446v3e0a2020v20202020w3c63633a576f7x26b0a2020202020202r02r0207264663a6j1626f757tw43d22223e0a20202t0202n02020203c64633a666hf726d61743er696d61z67h652f7376672b786d6c3wc2f64633a666f72q6d617k43e0a2020202020x2020203c64633a7479k70650a20202020202zt020202020n207264663a7j265736f75726365x3d22k687474703a2f2f70757n26c2e6f7u2672fl64s632f646or36d69747970w652f5374696c6c49j6d61676522202f3ge0a2020202020203c2kf63j633a576f726b3e0a2t02020203cmz2f7264663a5244463ej0a20203c2f6d65l7461646174m613e0a2020v3c64r6566730a20x2020202069643d2i2l646566733322202f3em0ta20203c636972636ch650a202k0202020637t83d2231383822s0a202020202063793dg223135y302e38220a20202020g20723d223134372e352v20a2020202i0207472616eu73666fk726d3d22747261y6e7s36c6174p6528y2d34302e352c2wdt332e3330303y030333129220a20l20202020s69643d226o36972636c653722202f3e0a3c2f7376673e0a \ No newline at end of file diff --git a/tests/Resources/photofun/decorations/46537/Kreis/Kreis.xml b/tests/Resources/photofun/decorations/46537/Kreis/Kreis.xml new file mode 100644 index 0000000..a3fa954 --- /dev/null +++ b/tests/Resources/photofun/decorations/46537/Kreis/Kreis.xml @@ -0,0 +1,2 @@ + +Formen \ No newline at end of file diff --git a/tests/testClipartColorReplacement/additional_fonts.txt b/tests/testClipartColorReplacement/additional_fonts.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/testClipartColorReplacement/cewe2pdf.ini b/tests/testClipartColorReplacement/cewe2pdf.ini new file mode 100644 index 0000000..99d54a9 --- /dev/null +++ b/tests/testClipartColorReplacement/cewe2pdf.ini @@ -0,0 +1,4 @@ +[DEFAULT] +cewe_folder = tests/ +hpsFolder = tests/hps +extraBackgroundFolders = ../Resources/photofun/backgrounds/201.jpg diff --git a/tests/testClipartColorReplacement/test_clipartColorReplacement.py b/tests/testClipartColorReplacement/test_clipartColorReplacement.py new file mode 100644 index 0000000..fae2237 --- /dev/null +++ b/tests/testClipartColorReplacement/test_clipartColorReplacement.py @@ -0,0 +1,37 @@ +# This test needs to be in its own directory, so it can have it's own cwew2pdf.ini. +# Also we can store the asset files here. + +# Test the clipart rendering with passepartout frame recoloring + +#if you run this file directly, it won't have access to parent folder, so add it to python path +import sys +sys.path.append('..') +sys.path.append('.') +from pathlib import Path +import os, os.path +from pikepdf import Pdf +from cewe2pdf import convertMcf + +def tryToBuildBook(keepDoublePages): + inFile = str(Path(Path.cwd(), 'tests', 'testClipartColorReplacement', 'test_clipart_colorreplacement.mcf')) + outFile = str(Path(Path.cwd(), 'tests', 'testClipartColorReplacement', 'test_clipart_colorreplacement.mcf.pdf')) + if os.path.exists(outFile) == True: + os.remove(outFile) + assert os.path.exists(outFile) == False + convertMcf(inFile, keepDoublePages) + assert Path(outFile).exists() == True + + #check the pdf contents + # we could also test more sophisticated things, like colors or compare images. + readPdf = Pdf.open(outFile) + numPages = len(readPdf.pages) + assert numPages == 28 + + #os.remove(outFile) + +def test_testClipartColorReplacement(): + tryToBuildBook(False) + +if __name__ == '__main__': + #only executed when this file is run directly. + test_testClipartColorReplacement() \ No newline at end of file diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf new file mode 100644 index 0000000..92e7f50 --- /dev/null +++ b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Image in a unmodified frame]]> + + + + + + + Frame with modified color]]> + + + + + + + Same with different rotations of image and frame (flipped)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf.pdf b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf.pdf new file mode 100644 index 0000000..99ca01f Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcf.pdf differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx new file mode 100644 index 0000000..6c2db59 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx.pdf b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx.pdf new file mode 100644 index 0000000..221a567 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement.mcfx.pdf differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/3j9lot1e_1_img_3695.jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/3j9lot1e_1_img_3695.jpg new file mode 100644 index 0000000..5f3d662 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/3j9lot1e_1_img_3695.jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_1_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_1_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..a0a8596 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_1_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_2_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_2_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..e646e48 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_2_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_3_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_3_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..62ba0a3 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_3_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_4_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_4_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..294d202 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_4_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_5_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_5_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..f19ecc8 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_5_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_6_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_6_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..f19ecc8 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_6_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_7_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_7_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg new file mode 100644 index 0000000..a0a8596 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/abx6bvk1_7_mandarin_duck,_kellogg_biological_station,_kalamazoo,_mi_(25137605482).jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/fc6vj6ns_1_20200320_124632.jpg b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/fc6vj6ns_1_20200320_124632.jpg new file mode 100644 index 0000000..617f4e0 Binary files /dev/null and b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/fc6vj6ns_1_20200320_124632.jpg differ diff --git a/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/folderid.xml b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/folderid.xml new file mode 100644 index 0000000..a964c0f --- /dev/null +++ b/tests/testClipartColorReplacement/test_clipart_colorreplacement_mcf-Dateien/folderid.xml @@ -0,0 +1,2 @@ + +
Image in a unmodified frame
Frame with modified color
Same with different rotations of image and frame (flipped)